Skip to content

Commit

Permalink
fix if check
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinefalisse committed Feb 9, 2024
1 parent bbc4b25 commit f23ddb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
r = requests.patch(trial_url, data={"status": "error"},
headers = {"Authorization": "Token {}".format(API_TOKEN)})
traceback.print_exc()
if 'pose detection timed out' in e.args[1].lower():
if len(e.args) > 1 and 'pose detection timed out' in e.args[1].lower():
logging.info("Worker failed. Stopping machine.")
message = "A backend OpenCap machine timed out during pose detection. It has been stopped."
sendStatusEmail(message=message)
Expand Down

0 comments on commit f23ddb1

Please sign in to comment.