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
1 changed files with 1 additions and 1 deletions

View File

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