Skip to content

Commit

Permalink
Adding back except for FileNotFoundError
Browse files Browse the repository at this point in the history
  • Loading branch information
HowieG committed Aug 2, 2024
1 parent 4fe5b37 commit 531ed3d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions agentops/time_travel.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,14 @@ def check_time_travel_active():
parent_dir = os.path.dirname(script_dir)
config_file_path = os.path.join(parent_dir, ".agentops_time_travel.yaml")

with open(config_file_path, "r") as config_file:
config = yaml.safe_load(config_file)
if config.get("Time_Travel_Debugging_Active", True):
manage_time_travel_state(activated=True)
return True
try:
with open(config_file_path, "r") as config_file:
config = yaml.safe_load(config_file)
if config.get("Time_Travel_Debugging_Active", True):
manage_time_travel_state(activated=True)
return True
except FileNotFoundError:
return False

return False

Expand Down

0 comments on commit 531ed3d

Please sign in to comment.