1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-30 19:21:17 +00:00

Repository: fix hints file unknown version error handling bug

This commit is contained in:
Marian Beermann 2016-07-04 00:55:12 +02:00
parent e7740458cd
commit f3aaffdb39

View file

@ -221,7 +221,7 @@ def prepare_txn(self, transaction_id, do_cleanup=True):
hints = msgpack.unpack(fd)
hints_version = hints[b'version']
if hints_version not in (1, 2):
raise ValueError('Unknown hints file version: %d' % hints['version'])
raise ValueError('Unknown hints file version: %d' % hints_version)
self.segments = hints[b'segments']
if hints_version == 1:
self.compact = set(hints[b'compact'])