Browse Source

Repository: fix hints file unknown version error handling bug

Marian Beermann 9 years ago
parent
commit
f3aaffdb39
1 changed files with 1 additions and 1 deletions
  1. 1 1
      borg/repository.py

+ 1 - 1
borg/repository.py

@@ -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'])