Skip to content

Commit

Permalink
fix: newer backup configs replace older ones
Browse files Browse the repository at this point in the history
  • Loading branch information
ShyAssassin committed Sep 11, 2023
1 parent 0c3cca8 commit ba58882
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TrackingBackend/app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def load(self, file: str = CONFIG_FILE) -> EyeTrackConfig:
if type(e) is ValidationError:
logger.error(f"Invalid data found in config\n{e}")
logger.critical("Config is corrupted, creating backup and regenerating")
os.rename(file, f"{file}.backup")
os.replace(file, f"{file}.backup")
except PermissionError:
logger.error("Permission Denied, assuming config has lock, Retrying...")
return self.load(file=file)
Expand Down

0 comments on commit ba58882

Please sign in to comment.