[Zope-Checkins] CVS: Zope/lib/python/ZODB - ExportImport.py:1.15
Jeremy Hylton
jeremy@zope.com
Mon, 2 Dec 2002 17:04:38 -0500
Update of /cvs-repository/Zope/lib/python/ZODB
In directory cvs.zope.org:/tmp/cvs-serv11811
Modified Files:
ExportImport.py
Log Message:
A few small cleanups also made in ZODB4.
=== Zope/lib/python/ZODB/ExportImport.py 1.14 => 1.15 ===
--- Zope/lib/python/ZODB/ExportImport.py:1.14 Wed Aug 14 18:07:09 2002
+++ Zope/lib/python/ZODB/ExportImport.py Mon Dec 2 17:04:37 2002
@@ -21,7 +21,8 @@
from referencesf import referencesf
from cStringIO import StringIO
from cPickle import Pickler, Unpickler
-TupleType=type(())
+from types import StringType, TupleType
+import zLOG
class ExportImport:
@@ -42,8 +43,12 @@
del oids[0]
if done(oid): continue
done_oids[oid]=1
- try: p, serial = load(oid, version)
- except: pass # Ick, a broken reference
+ try:
+ p, serial = load(oid, version)
+ except:
+ zLOG.LOG("ZODB", zLOG.DEBUG,
+ "broken reference for oid %s" % `oid`,
+ err=sys.exc_info())
else:
ref(p, oids)
write(oid)
@@ -96,8 +101,8 @@
read = file.read
def persistent_load(ooid,
- Ghost=Ghost, StringType=StringType,
- atoi=string.atoi, TupleType=type(()),
+ Ghost=Ghost,
+ atoi=string.atoi,
oids=oids, wrote_oid=oids.has_key,
new_oid=storage.new_oid):
@@ -151,8 +156,6 @@
store(oid, None, p, version, transaction)
-
-StringType=type('')
def TemporaryFile():
# This is sneaky suicide