[Zodb-checkins] CVS: ZODB3/Tools - fsrefs.py:1.6

Jeremy Hylton jeremy@zope.com
Tue, 4 Mar 2003 13:33:56 -0500


Update of /cvs-repository/ZODB3/Tools
In directory cvs.zope.org:/tmp/cvs-serv2237/Tools

Modified Files:
	fsrefs.py 
Log Message:
Be more robust about unpacking errors.
Print repr of description instead of str.


=== ZODB3/Tools/fsrefs.py 1.5 => 1.6 ===
--- ZODB3/Tools/fsrefs.py:1.5	Mon Jan 20 11:32:39 2003
+++ ZODB3/Tools/fsrefs.py	Tue Mar  4 13:33:52 2003
@@ -56,7 +56,7 @@
             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 @@
         for info in refs:
             try:
                 ref, klass = info
-            except TypeError:
+            except (ValueError, TypeError):
                 # failed to unpack
                 ref = info
                 klass = '<unknown>'