1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-23 16:26:29 +00:00

permit manifest version 2 as well 1 one.

This commit is contained in:
Martin Hostettler 2017-03-12 11:04:26 +01:00
parent 193e8bcaef
commit 1176a1c4e4

View file

@ -290,7 +290,7 @@ def load(cls, repository, operations, key=None, force_tam_not_required=False):
manifest_dict, manifest.tam_verified = key.unpack_and_verify_manifest(data, force_tam_not_required=force_tam_not_required)
m = ManifestItem(internal_dict=manifest_dict)
manifest.id = key.id_hash(data)
if m.get('version') != 1:
if m.get('version') not in (1, 2):
raise ValueError('Invalid manifest version')
manifest.archives.set_raw_dict(m.archives)
manifest.timestamp = m.get('timestamp')