GUI: Prevent double logging for configuration files

This commit is contained in:
deajan 2025-03-03 15:27:12 +01:00
parent 4946490914
commit 2791baf8a6
2 changed files with 3 additions and 4 deletions

View file

@ -948,9 +948,10 @@ def save_config(config_file: Path, full_config: dict) -> bool:
)
# We also need to extract permissions again
full_config = extract_permissions_from_full_config(full_config)
logger.info(f"Saved configuration file {config_file}")
return True
except OSError:
logger.critical(f"Cannot save configuration file to {config_file}")
except OSError as exc:
logger.critical(f"Cannot save configuration file to {config_file}: {exc}")
return False

View file

@ -2586,10 +2586,8 @@ Google Cloud storage: GOOGLE_PROJECT_ID GOOGLE_APPLICATION_CREDENTIALS\n\
result = configuration.save_config(config_file, full_config)
if result:
sg.Popup(_t("config_gui.configuration_saved"), keep_on_top=True)
logger.info("Configuration saved successfully.")
break
sg.PopupError(_t("config_gui.cannot_save_configuration"), keep_on_top=True)
logger.info("Could not save configuration")
continue
if event == _t("config_gui.show_decrypted"):
manager_password = configuration.get_manager_password(