From: Tim Hatch Date: Sat, 16 Apr 2011 00:14:53 +0000 (-0700) Subject: Show better errors with out-of-range Entry values X-Git-Tag: bup-0.25-rc1~32^2~2 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=bup.git;a=commitdiff_plain;h=fcccac7e2d760267f592d88f475a69a14a43c701 Show better errors with out-of-range Entry values When values can't be encoded in a struct, it's useful to actually give the values. Signed-off-by: Tim Hatch --- diff --git a/lib/bup/index.py b/lib/bup/index.py index b7e65dd..4900786 100644 --- a/lib/bup/index.py +++ b/lib/bup/index.py @@ -88,7 +88,7 @@ class Entry: self.uid, self.gid, self.size, self.mode, self.gitmode, self.sha, self.flags, self.children_ofs, self.children_n) - except DeprecationWarning, e: + except (DeprecationWarning, struct.error), e: log('pack error: %s (%r)\n' % (e, self)) raise