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
22391242
Commit
22391242
authored
Jun 11, 2003
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug in last-minute revision: Can't rebind retries in g().
parent
152a3193
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/ZODB/transact.py
src/ZODB/transact.py
+5
-4
No files found.
src/ZODB/transact.py
View file @
22391242
...
@@ -36,20 +36,21 @@ def transact(f, note=None, retries=5):
...
@@ -36,20 +36,21 @@ def transact(f, note=None, retries=5):
# XXX deal with ZEO disconnected errors?
# XXX deal with ZEO disconnected errors?
def
g
(
*
args
,
**
kwargs
):
def
g
(
*
args
,
**
kwargs
):
while
retries
:
n
=
retries
retries
-=
1
while
n
:
n
-=
1
try
:
try
:
r
=
f
(
*
args
,
**
kwargs
)
r
=
f
(
*
args
,
**
kwargs
)
except
ReadConflictError
,
msg
:
except
ReadConflictError
,
msg
:
get_transaction
().
abort
()
get_transaction
().
abort
()
if
not
retries
:
if
not
n
:
raise
raise
continue
continue
try
:
try
:
_commit
(
note
)
_commit
(
note
)
except
ConflictError
,
msg
:
except
ConflictError
,
msg
:
get_transaction
().
abort
()
get_transaction
().
abort
()
if
not
retries
:
if
not
n
:
raise
raise
continue
continue
return
r
return
r
...
...
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