Skip to content

Commit 7b93c4e

Browse files
committed
Copy doesn't lose track of the successful copies
1 parent b0797ed commit 7b93c4e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

supervisor/backups/manager.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -412,17 +412,17 @@ def copy_to_additional_locations() -> dict[str | None, Path]:
412412
UnhealthyReason.OSERROR_BAD_MESSAGE
413413
)
414414
raise
415-
416-
backup.all_locations.update(
417-
{
418-
loc: {
419-
ATTR_PATH: path,
420-
ATTR_PROTECTED: backup.protected,
421-
ATTR_SIZE_BYTES: backup.size_bytes,
415+
finally:
416+
backup.all_locations.update(
417+
{
418+
loc: {
419+
ATTR_PATH: path,
420+
ATTR_PROTECTED: backup.protected,
421+
ATTR_SIZE_BYTES: backup.size_bytes,
422+
}
423+
for loc, path in all_new_locations.items()
422424
}
423-
for loc, path in all_new_locations.items()
424-
}
425-
)
425+
)
426426

427427
@Job(name="backup_manager_import_backup")
428428
async def import_backup(

0 commit comments

Comments
 (0)