Skip to content

Commit

Permalink
Catch hook OSErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Kundert authored and Ken Kundert committed Oct 25, 2022
1 parent 4dd7033 commit 42fbf5e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions emborg/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ def signal_start(self):
def signal_end(self, exception):
if exception:
result = 'failure'
status = exception.status
payload = exception.stderr
if isinstance(exception, OSError):
status = 1
payload = str(exception)
else:
status = exception.status
payload = exception.stderr
else:
result = 'success'
status = 0
Expand Down

0 comments on commit 42fbf5e

Please sign in to comment.