diff --git a/BabbleApp/config.py b/BabbleApp/config.py index 2b740b0..9f313e7 100644 --- a/BabbleApp/config.py +++ b/BabbleApp/config.py @@ -83,9 +83,11 @@ class BabbleConfig(BaseModel): BabbleConfig(**json.load(settings_file)) shutil.copy(CONFIG_FILE_NAME, BACKUP_CONFIG_FILE_NAME) # print("Backed up settings files.") # Comment out because it's too loud. + except shutil.SameFileError: + pass except json.JSONDecodeError: # No backup because the saved settings file is broken. pass with open(CONFIG_FILE_NAME, "w") as settings_file: json.dump(obj=self.dict(), fp=settings_file, indent=2) - print("[INFO] Config Saved Successfully") + #print("[INFO] Config Saved Successfully")