[Zodb-checkins] CVS: Zope3/src/ZConfig - datatypes.py:1.14

Fred L. Drake, Jr. fred at zope.com
Thu Jul 3 17:15:35 EDT 2003


Update of /cvs-repository/Zope3/src/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv11648

Modified Files:
	datatypes.py 
Log Message:
existing_dirpath():  Simplify the checks to do less work; no change in
semantics.


=== Zope3/src/ZConfig/datatypes.py 1.13 => 1.14 ===
--- Zope3/src/ZConfig/datatypes.py:1.13	Mon Mar 24 15:52:39 2003
+++ Zope3/src/ZConfig/datatypes.py	Thu Jul  3 16:15:26 2003
@@ -209,10 +209,10 @@
     raise ValueError, '%s is not an existing file' % v
 
 def existing_dirpath(v):
-    if not os.path.split(v)[0]:
-        # relative pathname
-        return v
     dir = os.path.dirname(v)
+    if not dir:
+        # relative pathname with no directory component
+        return v
     if os.path.isdir(dir):
         return v
     raise ValueError, ('The directory named as part of the path %s '




More information about the Zodb-checkins mailing list