Skip to content

Commit

Permalink
#296: fix bug when error occurs before reporter is instantiated
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwoer committed Aug 7, 2024
1 parent bd6485e commit 5f0c3c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions alphadia/planning.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,9 @@ def run(
raise e

finally:
workflow.reporter.log_string(f"Finished workflow for {raw_name}")
workflow.reporter.context.__exit__(None, None, None)
if workflow.reporter:
workflow.reporter.log_string(f"Finished workflow for {raw_name}")
workflow.reporter.context.__exit__(None, None, None)
del workflow

try:
Expand Down

0 comments on commit 5f0c3c8

Please sign in to comment.