Skip to content

Commit

Permalink
Asserting that unpickled exception is an exception (#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Zabka authored Jul 1, 2020
1 parent 37f69dd commit 627f440
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion automation/TaskManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ def _check_failure_status(self) -> None:
"failure limit.", self.failure_status['CommandSequence']
)
if self.failure_status['ErrorType'] == 'CriticalChildException':
raise pickle.loads(self.failure_status['Exception'])
exc = pickle.loads(self.failure_status['Exception'])
assert type(exc) == BaseException
raise exc

# CRAWLER COMMAND CODE

Expand Down

0 comments on commit 627f440

Please sign in to comment.