1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-24 08:45:13 +00:00

transfer: fix exception in dry-run mode

Only call archive.stats.show_progress(final=True) if
we actually have an archive (== not in dry-run mode).
This commit is contained in:
Thomas Waldmann 2023-02-25 21:53:11 +01:00
parent 4d44b7d439
commit 2b935cfe41
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -134,9 +134,9 @@ def do_transfer(self, args, *, repository, manifest, cache, other_repository=Non
if not dry_run: if not dry_run:
item = upgrader.upgrade_item(item=item) item = upgrader.upgrade_item(item=item)
archive.add_item(item, show_progress=args.progress) archive.add_item(item, show_progress=args.progress)
if args.progress:
archive.stats.show_progress(final=True)
if not dry_run: if not dry_run:
if args.progress:
archive.stats.show_progress(final=True)
additional_metadata = upgrader.upgrade_archive_metadata(metadata=other_archive.metadata) additional_metadata = upgrader.upgrade_archive_metadata(metadata=other_archive.metadata)
archive.save(additional_metadata=additional_metadata) archive.save(additional_metadata=additional_metadata)
print( print(