Skip to content

Commit

Permalink
safe removal again
Browse files Browse the repository at this point in the history
  • Loading branch information
madhur-ob committed Dec 17, 2024
1 parent ae2fee1 commit 84db134
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion metaflow/runner/click_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,11 @@ def extract_flow_class_from_file(flow_file: str) -> FlowSpec:
finally:
# Only remove from path if we added it
if path_was_added:
sys.path.remove(flow_dir)
try:
sys.path.remove(flow_dir)
except ValueError:
# User's code might have removed it already
pass


class MetaflowAPI(object):
Expand Down

0 comments on commit 84db134

Please sign in to comment.