Commit a2ce6a3e authored by Jeremy Hylton's avatar Jeremy Hylton

A few small cleanups also made in ZODB4.

parent 15648d67
...@@ -21,7 +21,8 @@ from utils import p64, u64 ...@@ -21,7 +21,8 @@ from utils import p64, u64
from referencesf import referencesf from referencesf import referencesf
from cStringIO import StringIO from cStringIO import StringIO
from cPickle import Pickler, Unpickler from cPickle import Pickler, Unpickler
TupleType=type(()) from types import StringType, TupleType
import zLOG
class ExportImport: class ExportImport:
...@@ -42,8 +43,12 @@ class ExportImport: ...@@ -42,8 +43,12 @@ class ExportImport:
del oids[0] del oids[0]
if done(oid): continue if done(oid): continue
done_oids[oid]=1 done_oids[oid]=1
try: p, serial = load(oid, version) try:
except: pass # Ick, a broken reference p, serial = load(oid, version)
except:
zLOG.LOG("ZODB", zLOG.DEBUG,
"broken reference for oid %s" % `oid`,
err=sys.exc_info())
else: else:
ref(p, oids) ref(p, oids)
write(oid) write(oid)
...@@ -96,8 +101,8 @@ class ExportImport: ...@@ -96,8 +101,8 @@ class ExportImport:
read = file.read read = file.read
def persistent_load(ooid, def persistent_load(ooid,
Ghost=Ghost, StringType=StringType, Ghost=Ghost,
atoi=string.atoi, TupleType=type(()), atoi=string.atoi,
oids=oids, wrote_oid=oids.has_key, oids=oids, wrote_oid=oids.has_key,
new_oid=storage.new_oid): new_oid=storage.new_oid):
...@@ -152,8 +157,6 @@ class ExportImport: ...@@ -152,8 +157,6 @@ class ExportImport:
store(oid, None, p, version, transaction) store(oid, None, p, version, transaction)
StringType=type('')
def TemporaryFile(): def TemporaryFile():
# This is sneaky suicide # This is sneaky suicide
global TemporaryFile global TemporaryFile
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment