[Checkins] SVN: z3c.recipe.mkdir/trunk/z3c/recipe/mkdir/__init__.py Add check, whether a part of path is already a file.
Uli Fouquet
uli at gnufix.de
Tue Aug 18 18:24:03 EDT 2009
Log message for revision 102922:
Add check, whether a part of path is already a file.
Changed:
U z3c.recipe.mkdir/trunk/z3c/recipe/mkdir/__init__.py
-=-
Modified: z3c.recipe.mkdir/trunk/z3c/recipe/mkdir/__init__.py
===================================================================
--- z3c.recipe.mkdir/trunk/z3c/recipe/mkdir/__init__.py 2009-08-18 22:06:04 UTC (rev 102921)
+++ z3c.recipe.mkdir/trunk/z3c/recipe/mkdir/__init__.py 2009-08-18 22:24:03 UTC (rev 102922)
@@ -30,6 +30,9 @@
def createIntermediatePaths(self, path):
parent = os.path.dirname(path)
+ if os.path.exists(path) and not os.path.isdir(path):
+ raise zc.buildout.UserError(
+ "Cannot create directory: %s. It's a file." % path)
if os.path.exists(path) or parent == path:
return
self.createIntermediatePaths(parent)
More information about the Checkins
mailing list