|
|
|
@ -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:
|
|
|
|
|