Change return value for makeDirectory

master3.3
Mike Hiretsky 12 years ago
parent 18bde0ae57
commit 55d661d804

@ -545,14 +545,14 @@ def listDirectory(directory,fullPath=False,onlyDir=False):
def makeDirectory(pathname):
"""Make directory and parent.
If directory exists then return False else True"""
Return False on error"""
try:
parent = path.split(path.normpath(pathname))[0]
if not path.exists(parent):
makeDirectory(parent)
else:
if path.exists(pathname):
return False
return True
os.mkdir(pathname)
return True
except Exception, e:

Loading…
Cancel
Save