mirror of https://github.com/borgbackup/borg.git
Repository: fix hints file unknown version error handling bug
This commit is contained in:
parent
e7740458cd
commit
f3aaffdb39
|
@ -221,7 +221,7 @@ class Repository:
|
||||||
hints = msgpack.unpack(fd)
|
hints = msgpack.unpack(fd)
|
||||||
hints_version = hints[b'version']
|
hints_version = hints[b'version']
|
||||||
if hints_version not in (1, 2):
|
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']
|
self.segments = hints[b'segments']
|
||||||
if hints_version == 1:
|
if hints_version == 1:
|
||||||
self.compact = set(hints[b'compact'])
|
self.compact = set(hints[b'compact'])
|
||||||
|
|
Loading…
Reference in New Issue