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

Jeremy Hylton jeremy@zope.com
Mon, 4 Nov 2002 10:20:20 -0500


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

Modified Files:
	fsrefs.py 
Log Message:
refs isn't necessarily a list of tuples.

There are some cases, can't recall exactly what they are, where a
single ref is returned instead of a ref, class info tuple.


=== ZODB3/Tools/fsrefs.py 1.3 => 1.4 ===
--- ZODB3/Tools/fsrefs.py:1.3	Wed Oct 16 16:48:03 2002
+++ ZODB3/Tools/fsrefs.py	Mon Nov  4 10:20:19 2002
@@ -76,8 +76,14 @@
             # storage, but that seems like overkill.
             
         refs = get_refs(data)
-        missing = [] # contains 3-tuples of oid, klass-metadata, reason 
-        for ref, klass in refs:
+        missing = [] # contains 3-tuples of oid, klass-metadata, reason
+        for info in refs:
+            try:
+                ref, klass = info
+            except TypeError:
+                # failed to unpack
+                ref = info
+                klass = '<unknown>'
             if not fs._index.has_key(ref):
                 missing.append((ref, klass, "missing"))
             if noload.has_key(ref):