Commit 8bbc4782 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

modified quick-merge to create the destination directory if missing

parent 6cf6ca2c
...@@ -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)):
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):
raise raise
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment