Skip to content
Snippets Groups Projects
Commit b374e43b authored by Seblu's avatar Seblu
Browse files

isimage doesn't fail if image directory partially exists

parent dd63962f
No related branches found
No related tags found
No related merge requests found
......@@ -61,7 +61,8 @@ class SourceImage(Image):
arrow("Creating base directories", 1, verbose)
try:
for d in (path, parser_path, setup_path, data_path):
os.mkdir(d)
if not os.path.exists(d) or not os.path.isdir(d):
os.mkdir(d)
except Exception as e:
raise Exception("Unable to create directory: %s: %s" % (d, e))
# create example files
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment