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
f16c22fb
Commit
f16c22fb
authored
Jun 25, 2007
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a work-around for a bug in exception pickling in Python 2.5.
parent
a5d2b4c8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
src/ZODB/POSException.py
src/ZODB/POSException.py
+14
-0
No files found.
src/ZODB/POSException.py
View file @
f16c22fb
...
@@ -21,9 +21,23 @@ def _fmt_undo(oid, reason):
...
@@ -21,9 +21,23 @@ def _fmt_undo(oid, reason):
s
=
reason
and
(
": %s"
%
reason
)
or
""
s
=
reason
and
(
": %s"
%
reason
)
or
""
return
"Undo error %s%s"
%
(
oid_repr
(
oid
),
s
)
return
"Undo error %s%s"
%
(
oid_repr
(
oid
),
s
)
def
_recon
(
class_
,
state
):
err
=
class_
.
__new__
(
class_
)
err
.
__setstate__
(
state
)
return
err
_recon
.
__no_side_effects__
=
True
class
POSError
(
StandardError
):
class
POSError
(
StandardError
):
"""Persistent object system error."""
"""Persistent object system error."""
def
__reduce__
(
self
):
# Cope extra data from internal structures
state
=
self
.
__dict__
.
copy
()
state
[
'message'
]
=
self
.
message
state
[
'args'
]
=
self
.
args
return
(
_recon
,
(
self
.
__class__
,
state
))
class
POSKeyError
(
KeyError
,
POSError
):
class
POSKeyError
(
KeyError
,
POSError
):
"""Key not found in database."""
"""Key not found in database."""
...
...
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