Commit 869099de authored by Daniele Venzano's avatar Daniele Venzano

Catch the exception when log files cannot be created

parent 7386dca3
...@@ -62,9 +62,12 @@ def save(execution: Execution): ...@@ -62,9 +62,12 @@ def save(execution: Execution):
if log_gen is None: if log_gen is None:
_shutdown() _shutdown()
return return
with open(fpath, 'wb') as out_fp: try:
for line in log_gen: with open(fpath, 'wb') as out_fp:
out_fp.write(line) for line in log_gen:
except FileNotFoundError:
log.error("Could not create file {}".format(fpath))
_shutdown() _shutdown()
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment