[Zope-Checkins] CVS: Packages/ZODB - fsdump.py:126.96.36.199
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
Many changes to fsrefs.py, based on problems I hit using it in real life.
=== Packages/ZODB/fsdump.py 1.7 => 188.8.131.52 ===
--- 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 @@
# 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 Zope-Checkins