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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
d391f9e7
Commit
d391f9e7
authored
Feb 23, 2004
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug in the error reporting. Errors were tracked independently
for each transaction. Now they are tracked globally.
parent
b98698fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
trunk/src/ZODB/zodb4/conversion.py
trunk/src/ZODB/zodb4/conversion.py
+6
-5
No files found.
trunk/src/ZODB/zodb4/conversion.py
View file @
d391f9e7
...
...
@@ -20,6 +20,8 @@ from cStringIO import StringIO
from
ZODB.FileStorage
import
FileStorage
from
ZODB.zodb4
import
z4iterator
errors
=
{}
skipped
=
0
class
Conversion
:
...
...
@@ -33,6 +35,9 @@ class Conversion:
self
.
outstore
.
copyTransactionsFrom
(
self
.
instore
)
self
.
outstore
.
close
()
self
.
instore
.
close
()
if
errors
:
sys
.
stderr
.
write
(
error_explanation
)
sys
.
stderr
.
write
(
"%s database records skipped
\
n
"
%
skipped
)
class
IterableFileIterator
(
z4iterator
.
FileIterator
):
...
...
@@ -57,8 +62,7 @@ class DataRecordConvertingTxn(object):
return
getattr
(
self
.
_txn
,
name
)
def
__iter__
(
self
):
errors
=
{}
skipped
=
0
global
skipped
for
record
in
self
.
_txn
:
record
.
tid
=
record
.
serial
# transform the data record format
...
...
@@ -88,9 +92,6 @@ class DataRecordConvertingTxn(object):
record
.
data
=
sio
.
getvalue
()
yield
record
if
errors
:
sys
.
stderr
.
write
(
error_explanation
)
sys
.
stderr
.
write
(
"%s database records skipped
\
n
"
%
skipped
)
error_explanation
=
"""
There were import errors while copying data records.
...
...
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