[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope-cvs
Subject:    [Zope-Checkins] SVN: Zope/branches/2.10/test.py don't muck up the
From:       Rob Miller <ra () burningman ! com>
Date:       2008-09-11 23:27:38
Message-ID: 20080911232738.0B90F39658 () cvs ! zope ! org
[Download RAW message or body]

Log message for revision 91070:
  don't muck up the environ if Zope libs are already available
  

Changed:
  U   Zope/branches/2.10/test.py

-=-
Modified: Zope/branches/2.10/test.py
===================================================================
--- Zope/branches/2.10/test.py	2008-09-11 21:10:37 UTC (rev 91069)
+++ Zope/branches/2.10/test.py	2008-09-11 23:27:37 UTC (rev 91070)
@@ -53,7 +53,11 @@
         zhome = scriptdir
     shome = os.path.join(zhome, 'lib', 'python')
 
-sys.path.insert(0, shome)
+# add SOFTWARE_HOME to sys.path, but only if Zope isn't already available
+try:
+    import Zope2
+except ImportError:
+    sys.path.insert(0, shome)
 
 defaults = '--tests-pattern ^tests$ -v'.split()
 defaults += ['-m',

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic