do not ignore missing key as it migth indicate problems.

improved logging
This commit is contained in:
Thies Lennart Alff 2025-01-03 13:58:19 +01:00
parent b432630bd8
commit 620eb5b117
Signed by: lennartalff
GPG key ID: 4EC67D34D594104D
2 changed files with 2 additions and 5 deletions

View file

@ -74,7 +74,7 @@ class NextcloudManager(backup_manager.BackupManager):
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
self._gotify.send_subprocess_error("Dumping database failed", e) self._gotify.send_subprocess_error("Dumping database failed", e)
return False return False
self._gotify.send_backup_successful(result) self._gotify.send_success("Database dumped", result)
return True return True

View file

@ -34,10 +34,7 @@ class PaperlessManager(backup_manager.BackupManager):
def main(): def main():
config = read_config() config = read_config()
try:
os.chdir(config["common"]["BACKUP_DOCKER_DIR"]) os.chdir(config["common"]["BACKUP_DOCKER_DIR"])
except KeyError:
pass
backup_manager = PaperlessManager(config) backup_manager = PaperlessManager(config)
if not backup_manager.export_data(): if not backup_manager.export_data():
exit(1) exit(1)