mirror of https://github.com/vitalif/openscad
Catch File Exists on makedirs to better support parallel runs
parent
ce24e2e29b
commit
22e46762f8
|
@ -143,10 +143,18 @@ def run_test(testname, cmd, args):
|
|||
cmdname = os.path.split(options.cmd)[1]
|
||||
|
||||
if options.generate:
|
||||
if not os.path.exists(expecteddir): os.makedirs(expecteddir)
|
||||
if not os.path.exists(expecteddir):
|
||||
try:
|
||||
os.makedirs(expecteddir)
|
||||
except OSError as e:
|
||||
if e.errno != 17: raise e # catch File Exists to allow parallel runs
|
||||
outputname = expectedfilename
|
||||
else:
|
||||
if not os.path.exists(actualdir): os.makedirs(actualdir)
|
||||
if not os.path.exists(actualdir):
|
||||
try:
|
||||
os.makedirs(actualdir)
|
||||
except OSError as e:
|
||||
if e.errno != 17: raise e # catch File Exists to allow parallel runs
|
||||
outputname = actualfilename
|
||||
outputname = os.path.normpath(outputname)
|
||||
|
||||
|
|
Loading…
Reference in New Issue