Skip to content
Snippets Groups Projects
Commit b4da45c5 authored by Sebastien Jourdain's avatar Sebastien Jourdain Committed by Code Review
Browse files

Merge topic 'vtkweb-widget-mkdir-error' into master

8c7aca78 Attempt to handle some system raise condition
parents b90a7749 8c7aca78
No related branches found
No related tags found
No related merge requests found
......@@ -56,17 +56,26 @@ with open(args.b, 'r') as fp:
banner = template.substitute(vars)
# write output to file
dir = os.path.dirname(args.m)
if not os.path.exists(dir):
os.makedirs(dir);
dest_dir = os.path.dirname(args.m)
if not os.path.exists(dest_dir):
try:
os.makedirs(dest_dir);
except OSError, e:
if e.errno != 17:
raise
with open(args.m,"w") as fp:
fp.write(banner)
fp.write(output.getvalue())
# write minimized output to file
dir = os.path.dirname(args.o)
if not os.path.exists(dir):
os.makedirs(dir);
dest_dir = os.path.dirname(args.o)
if not os.path.exists(dest_dir):
try:
os.makedirs(dest_dir);
except OSError, e:
if e.errno != 17:
raise
if isJavaScript:
with open(args.o,"w") as fp:
......
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