Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
ZODB
Commits
a2ce6a3e
Commit
a2ce6a3e
authored
Dec 02, 2002
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A few small cleanups also made in ZODB4.
parent
15648d67
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
src/ZODB/ExportImport.py
src/ZODB/ExportImport.py
+10
-7
No files found.
src/ZODB/ExportImport.py
View file @
a2ce6a3e
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment