From 6ff231209033ee16c423d5e38032bc271ee285f5 Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 16 Oct 2024 17:13:19 +0200 Subject: [PATCH] fix restore output --- backupbot.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/backupbot.py b/backupbot.py index b5191a9..10b4efb 100755 --- a/backupbot.py +++ b/backupbot.py @@ -126,10 +126,11 @@ def restore(snapshot, target, noninteractive, volumes, container, no_commands): print(f"Snapshot to restore: \t{snapshot}") restore_app_versions = app_versions_from_tags(snapshots[0].get('tags')) print("Apps:") - for app, version in restore_app_versions.items(): - print(f"\t{app} \t {version}") - if apps_versions.get(app) != version: - print(f"WARNING!!! The running app is deployed with version {apps_versions.get(app)}") + for app, version in apps_versions.items(): + restore_version = restore_app_versions.get(app) + print(f"\t{app} \t {restore_version}") + if version != restore_version: + print(f"WARNING!!! The running app is deployed with version {version}") print("The following volume paths will be restored:") for p in backup_paths: print(f'\t{p}')