[4suite-checkins] [XML1_0-maint] In 4Suite/Ft/Lib, files ImportUtil.py

Jeremy Kloth jkloth at 4suite.org
Fri Dec 8 15:50:54 MST 2006


Branch: XML1_0-maint

Modified Files:
    ImportUtil.py

Log Message:
Fixed error handling the interactive sys.path entry of ''.

ViewCVS diff:
  http://cvs.4suite.org/viewcvs/4Suite/Ft/Lib/ImportUtil.py.diff?r1=1.1.2.1&r2=1.1.2.2
ViewCVS view:
  http://cvs.4suite.org/viewcvs/4Suite/Ft/Lib/ImportUtil.py?rev=1.1.2.2&content-type=text/vnd.viewcvs-markup

Index: ImportUtil.py
===================================================================
RCS file: /var/local/cvsroot/4Suite/Ft/Lib/ImportUtil.py,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -U2 -r1.1.2.1 -r1.1.2.2
--- ImportUtil.py	24 Sep 2006 20:59:35 -0000	1.1.2.1
+++ ImportUtil.py	8 Dec 2006 22:50:53 -0000	1.1.2.2
@@ -67,6 +67,9 @@
 
         def __init__(self, path=None):
-            if path is not None and not os.path.isdir(path):
-                raise ImportError("not a directory")
+            if path is not None:
+                if not path:
+                    path = '.'
+                elif not os.path.isdir(path):
+                    raise ImportError("not a directory")
             self.path = path
 


More information about the 4suite-checkins mailing list