Commit 9770a40e authored by Link Mauve's avatar Link Mauve
Browse files

When reading logs, don’t consider a non-existing file as an error.

parent ae7c5064
......@@ -117,10 +117,15 @@ class Logger(object):
try:
fd = open(os.path.join(log_dir, jid), 'rb')
except:
except FileNotFoundError:
log.info('Non-existing log file (%s)',
os.path.join(log_dir, jid),
exc_info=True)
return
except OSError:
log.error('Unable to open the log file (%s)',
os.path.join(log_dir, jid),
exc_info=True)
os.path.join(log_dir, jid),
exc_info=True)
return
if not fd:
return
......
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