[Zodb-checkins] CVS: Packages/ZODB - fsdump.py:1.7.8.1

Tim Peters tim.one at comcast.net
Tue Aug 17 19:22:49 EDT 2004


Update of /cvs-repository/Packages/ZODB
In directory cvs.zope.org:/tmp/cvs-serv28032/ZODB

Modified Files:
      Tag: Zope-2_7-branch
	fsdump.py 
Log Message:
Many changes to fsrefs.py, based on problems I hit using it in real life.


=== Packages/ZODB/fsdump.py 1.7 => 1.7.8.1 ===
--- Packages/ZODB/fsdump.py:1.7	Fri May  2 10:50:39 2003
+++ Packages/ZODB/fsdump.py	Tue Aug 17 19:22:48 2004
@@ -10,13 +10,14 @@
 
 def get_pickle_metadata(data):
     # ZODB's data records contain two pickles.  The first is the class
-    # of the object, the second is the object.
-    if data.startswith('(c'):
+    # of the object, the second is the object.  We're only trying to
+    # pick apart the first here, to extract the module and class names.
+    if data.startswith('(c'):   # pickle MARK GLOBAL sequence
         # Don't actually unpickle a class, because it will attempt to
         # load the class.  Just break open the pickle and get the
         # module and class from it.
         modname, classname, rest = data.split('\n', 2)
-        modname = modname[2:]
+        modname = modname[2:]   # strip leading '(c'
         return modname, classname
     f = StringIO(data)
     u = Unpickler(f)



More information about the Zodb-checkins mailing list