little adds and changes

This commit is contained in:
Bastian Schroll 2018-01-07 23:41:52 +01:00
parent b275abd86f
commit f64a521bd9
3 changed files with 8 additions and 5 deletions

View file

@ -32,7 +32,10 @@ def createIfNotExist(dirPath):
@param dirName: Path of the directory
@return Path of the directory"""
if not os.path.exists(dirPath):
os.mkdir(dirPath)
logging.debug("directory created: %s", dirPath)
try:
if not os.path.exists(dirPath):
os.mkdir(dirPath)
logging.debug("directory created: %s", dirPath)
except:
logging.exception("error by creating a directory: %s", dirPath)
return dirPath