]> arthur.barton.de Git - bup.git/commitdiff
Show better errors with out-of-range Entry values
authorTim Hatch <tim@timhatch.com>
Sat, 16 Apr 2011 00:14:53 +0000 (17:14 -0700)
committerTim Hatch <tim@timhatch.com>
Sat, 16 Apr 2011 00:14:53 +0000 (17:14 -0700)
When values can't be encoded in a struct, it's useful to actually give the values.

Signed-off-by: Tim Hatch <tim@timhatch.com>
lib/bup/index.py

index b7e65dd422357d71525326a1f9d70788cb736dab..4900786263f90b1a3730a5887bce868d3ef382ee 100644 (file)
@@ -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