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
nexedi
ZODB
Commits
154887a6
Commit
154887a6
authored
Jul 21, 2007
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added missing data attribute for conflict errors.
parent
03c08efa
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
3 deletions
+41
-3
NEWS.txt
NEWS.txt
+2
-0
src/ZODB/POSException.py
src/ZODB/POSException.py
+2
-3
src/ZODB/tests/test_misc.py
src/ZODB/tests/test_misc.py
+37
-0
No files found.
NEWS.txt
View file @
154887a6
...
...
@@ -25,6 +25,8 @@ General
- (3.8.0b3) Make it possible to examine oid and (in some situations) database
name of persistent object references during conflict resolution.
- (3.8.0b3) Added missing data attribute for conflict errors.
ZEO
---
...
...
src/ZODB/POSException.py
View file @
154887a6
...
...
@@ -106,12 +106,11 @@ class ConflictError(TransactionError):
# avoid circular import chain
from
ZODB.utils
import
get_pickle_metadata
self
.
class_name
=
"%s.%s"
%
get_pickle_metadata
(
data
)
## else:
## if message != "data read conflict error":
## raise RuntimeError
self
.
serials
=
serials
self
.
data
=
data
def
__str__
(
self
):
extras
=
[]
if
self
.
oid
:
...
...
src/ZODB/tests/test_misc.py
0 → 100644
View file @
154887a6
##############################################################################
#
# Copyright (c) 2006 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Misc tests :)
"""
import
unittest
from
zope.testing
import
doctest
def
conflict_error_retains_data_passed
():
r"""
ConflictError can be passed a data record which it claims to retain as
an attribute.
>>> import ZODB.POSException
>>>
>>> ZODB.POSException.ConflictError(data='cM\nC\n').data
'cM\nC\n'
"""
def
test_suite
():
return
unittest
.
TestSuite
((
doctest
.
DocTestSuite
(),
))
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