take care to empty string in cubes search path
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 26 Mar 2010 17:07:41 +0100
changeset 5049 1b5c873029a1
parent 5048 bf8a53a11b6d
child 5052 c9dbd95333f7
take care to empty string in cubes search path
cwconfig.py
--- a/cwconfig.py	Fri Mar 26 16:15:41 2010 +0100
+++ b/cwconfig.py	Fri Mar 26 17:07:41 2010 +0100
@@ -351,11 +351,8 @@
     @classmethod
     def cubes_search_path(cls):
         """return the path of directories where cubes should be searched"""
-        path = []
-        for directory in cls.CUBES_PATH:
-            directory = abspath(normpath(directory))
-            if exists(directory) and not directory in path:
-                path.append(directory)
+        path = [abspath(normpath(directory)) for directory in cls.CUBES_PATH
+                if directory.strip() and exists(directory.strip())]
         if not cls.CUBES_DIR in path and exists(cls.CUBES_DIR):
             path.append(cls.CUBES_DIR)
         return path