[Zodb-checkins] CVS: StandaloneZODB/ZODB - fsdump.py:1.1.2.2

Jeremy Hylton jeremy@zope.com
Thu, 24 Jan 2002 15:34:19 -0500


Update of /cvs-repository/StandaloneZODB/ZODB
In directory cvs.zope.org:/tmp/cvs-serv27707

Modified Files:
      Tag: Recovery
	fsdump.py 
Log Message:
Handle iterator data record where data == None.


=== StandaloneZODB/ZODB/fsdump.py 1.1.2.1 => 1.1.2.2 ===
         j = 0
         for rec in trans:
-            modname, classname = get_pickle_metadata(rec.data)
-            dig = md5.new(rec.data).hexdigest()
-            fullclass = "%s.%s" % (modname, classname)
+            if rec.data is None:
+                fullclass = "undo or abort of object creation"
+            else:
+                modname, classname = get_pickle_metadata(rec.data)
+                dig = md5.new(rec.data).hexdigest()
+                fullclass = "%s.%s" % (modname, classname)
             # special case for testing purposes
             if fullclass == "ZODB.tests.MinPO.MinPO":
                 obj = zodb_unpickle(rec.data)