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):
if log_gen is None:
_shutdown()
return
with open(fpath, 'wb') as out_fp:
for line in log_gen:
out_fp.write(line)
try:
with open(fpath, 'wb') as out_fp:
for line in log_gen:
out_fp.write(line)
except FileNotFoundError:
log.error("Could not create file {}".format(fpath))
_shutdown()
......
Markdown is supported
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