Skip to content
Snippets Groups Projects
Commit b1c2124e authored by Marco Clemencic's avatar Marco Clemencic
Browse files

modified quick-merge to create the destination directory if missing

Fixes GAUDI-1240

See merge request !191
parents 6cf6ca2c 8bbc4782
No related branches found
No related tags found
1 merge request!191modified quick-merge to create the destination directory if missing
Pipeline #
...@@ -33,9 +33,13 @@ if __name__ == '__main__': ...@@ -33,9 +33,13 @@ if __name__ == '__main__':
logging.error('file %s not found', i) logging.error('file %s not found', i)
sys.exit(1) sys.exit(1)
try: try:
# create the destination directory if missing
if not os.path.isdir(os.path.dirname(output)):
os.makedirs(os.path.dirname(output))
with open(output, 'wb') as out: with open(output, 'wb') as out:
for input in inputs: for input in inputs:
out.writelines(open(input, 'rb')) out.writelines(open(input, 'rb'))
except: except:
os.remove(output) if os.path.exists(output):
os.remove(output)
raise raise
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