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
Joshua
zodb
Commits
9acb99e8
Commit
9acb99e8
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
855a2f8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/ZODB/zodb4/conversion.py
src/ZODB/zodb4/conversion.py
+6
-5
No files found.
src/ZODB/zodb4/conversion.py
View file @
9acb99e8
...
@@ -20,6 +20,8 @@ from cStringIO import StringIO
...
@@ -20,6 +20,8 @@ from cStringIO import StringIO
from
ZODB.FileStorage
import
FileStorage
from
ZODB.FileStorage
import
FileStorage
from
ZODB.zodb4
import
z4iterator
from
ZODB.zodb4
import
z4iterator
errors
=
{}
skipped
=
0
class
Conversion
:
class
Conversion
:
...
@@ -33,6 +35,9 @@ class Conversion:
...
@@ -33,6 +35,9 @@ class Conversion:
self
.
outstore
.
copyTransactionsFrom
(
self
.
instore
)
self
.
outstore
.
copyTransactionsFrom
(
self
.
instore
)
self
.
outstore
.
close
()
self
.
outstore
.
close
()
self
.
instore
.
close
()
self
.
instore
.
close
()
if
errors
:
sys
.
stderr
.
write
(
error_explanation
)
sys
.
stderr
.
write
(
"%s database records skipped
\
n
"
%
skipped
)
class
IterableFileIterator
(
z4iterator
.
FileIterator
):
class
IterableFileIterator
(
z4iterator
.
FileIterator
):
...
@@ -57,8 +62,7 @@ class DataRecordConvertingTxn(object):
...
@@ -57,8 +62,7 @@ class DataRecordConvertingTxn(object):
return
getattr
(
self
.
_txn
,
name
)
return
getattr
(
self
.
_txn
,
name
)
def
__iter__
(
self
):
def
__iter__
(
self
):
errors
=
{}
global
skipped
skipped
=
0
for
record
in
self
.
_txn
:
for
record
in
self
.
_txn
:
record
.
tid
=
record
.
serial
record
.
tid
=
record
.
serial
# transform the data record format
# transform the data record format
...
@@ -88,9 +92,6 @@ class DataRecordConvertingTxn(object):
...
@@ -88,9 +92,6 @@ class DataRecordConvertingTxn(object):
record
.
data
=
sio
.
getvalue
()
record
.
data
=
sio
.
getvalue
()
yield
record
yield
record
if
errors
:
sys
.
stderr
.
write
(
error_explanation
)
sys
.
stderr
.
write
(
"%s database records skipped
\
n
"
%
skipped
)
error_explanation
=
"""
error_explanation
=
"""
There were import errors while copying data records.
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