dont add CUBES_DIR to cubes search path if it doesn't exists stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 17 Feb 2010 11:26:09 +0100
branchstable
changeset 4606 3b7ce7036b19
parent 4605 7f884ee28519
child 4607 55eab66c6592
dont add CUBES_DIR to cubes search path if it doesn't exists
cwconfig.py
--- a/cwconfig.py	Wed Feb 17 11:25:46 2010 +0100
+++ b/cwconfig.py	Wed Feb 17 11:26:09 2010 +0100
@@ -347,7 +347,7 @@
                     path.append(directory)
         except KeyError:
             pass
-        if not cls.CUBES_DIR in path:
+        if not cls.CUBES_DIR in path and exists(cls.CUBES_DIR):
             path.append(cls.CUBES_DIR)
         return path
 
@@ -474,7 +474,7 @@
         from logilab.common.modutils import load_module_from_file
         cls.cls_adjust_sys_path()
         for ctlfile in ('web/webctl.py',  'etwist/twctl.py',
-                        'server/serverctl.py', 
+                        'server/serverctl.py',
                         'devtools/devctl.py', 'goa/goactl.py'):
             if exists(join(CW_SOFTWARE_ROOT, ctlfile)):
                 try: