From 620eb5b117e3e1296578a2fb5c18d74ddd7ab0cc Mon Sep 17 00:00:00 2001 From: Thies Lennart Alff Date: Fri, 3 Jan 2025 13:58:19 +0100 Subject: [PATCH] do not ignore missing key as it migth indicate problems. improved logging --- nextcloud_backup | 2 +- paperless-ngx_backup | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/nextcloud_backup b/nextcloud_backup index be24fd8..34d2631 100755 --- a/nextcloud_backup +++ b/nextcloud_backup @@ -74,7 +74,7 @@ class NextcloudManager(backup_manager.BackupManager): except subprocess.CalledProcessError as e: self._gotify.send_subprocess_error("Dumping database failed", e) return False - self._gotify.send_backup_successful(result) + self._gotify.send_success("Database dumped", result) return True diff --git a/paperless-ngx_backup b/paperless-ngx_backup index c681558..fb6e734 100755 --- a/paperless-ngx_backup +++ b/paperless-ngx_backup @@ -34,10 +34,7 @@ class PaperlessManager(backup_manager.BackupManager): def main(): config = read_config() - try: - os.chdir(config["common"]["BACKUP_DOCKER_DIR"]) - except KeyError: - pass + os.chdir(config["common"]["BACKUP_DOCKER_DIR"]) backup_manager = PaperlessManager(config) if not backup_manager.export_data(): exit(1)