Commit 247d23dc authored by Jeremy Hylton's avatar Jeremy Hylton

Be more robust about unpacking errors.

Print repr of description instead of str.
parent 4e36c877
......@@ -56,7 +56,7 @@ def report(oid, data, serial, fs, missing):
description = "%s.%s" % info
else:
description = str(info)
print "\toid %s %s: %s" % (hex(u64(oid)), reason, description)
print "\toid %s %s: %r" % (hex(u64(oid)), reason, description)
print
def main(path):
......@@ -80,7 +80,7 @@ def main(path):
for info in refs:
try:
ref, klass = info
except TypeError:
except (ValueError, TypeError):
# failed to unpack
ref = info
klass = '<unknown>'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment