commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r6290 - trunk/gnue-common


From: reinhard
Subject: r6290 - trunk/gnue-common
Date: Wed, 15 Sep 2004 16:20:11 -0500 (CDT)

Author: reinhard
Date: 2004-09-15 16:20:10 -0500 (Wed, 15 Sep 2004)
New Revision: 6290

Modified:
   trunk/gnue-common/setup-cvs.py
Log:
Ugly ugly hack to make it work under python 2.1.


Modified: trunk/gnue-common/setup-cvs.py
===================================================================
--- trunk/gnue-common/setup-cvs.py      2004-09-15 19:21:31 UTC (rev 6289)
+++ trunk/gnue-common/setup-cvs.py      2004-09-15 21:20:10 UTC (rev 6290)
@@ -33,7 +33,12 @@
 
 import sys, string, os, glob
 
-CVSDIR = os.path.abspath(os.path.join(os.path.dirname(__file__),'..'))
+# Hack for python 2.1 compatibility. With 2.3 we can use the global __file__
+m = __import__ ('setup-cvs', None, None, '*')
+if __name__ == '__main__':
+  sys.exit (0)
+
+CVSDIR = os.path.abspath(os.path.join(os.path.dirname(m.__file__),'..'))
 BASEDIR = os.path.join(CVSDIR, '.cvsdevelbase')
 PYTHONBIN=sys.executable
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]