Skip to content

Commit

Permalink
minor error handling change
Browse files Browse the repository at this point in the history
  • Loading branch information
Angeraa committed Oct 28, 2023
1 parent 4eba00d commit 574f223
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ class Finished(Exception):
try:
loggers[process.args[-1].split("/")[1]].info(f"From {process.args}:{output}")
print(f"\nOutput from {process.args} logged")
except IndexError:
except (IndexError, KeyError):
print(f"\nOutput from {process.args} logged in other.log")
loggers["other"].info(f"From{process.args}:{output}")

if err and "KeyboardInterrupt" not in err:
try:
loggers[process.args[-1].split("/")[1]].error(f"From {process.args}:{err}")
print(f"\nError from {process.args} logged")
except IndexError:
except (IndexError, KeyError):
print(f"\nError from {process.args} logged in other.log")
loggers["other"].error(f"From{process.args}:{err}")
logging.shutdown()
Expand Down

0 comments on commit 574f223

Please sign in to comment.