1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-03-11 14:48:22 +00:00

work around missing size/nfiles archive metadata, fixes #8491

This commit is contained in:
Thomas Waldmann 2024-10-27 01:19:08 +02:00
parent f7f2f23a7c
commit cea2d5809d
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -149,8 +149,8 @@ class Archives:
exists=True, # repo has a valid archive item
username=archive_item.username,
hostname=archive_item.hostname,
size=archive_item.size,
nfiles=archive_item.nfiles,
size=archive_item.get("size", 0),
nfiles=archive_item.get("nfiles", 0),
comment=archive_item.comment, # not always present?
tags=tuple(sorted(getattr(archive_item, "tags", []))), # must be hashable
)