Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
9d8081f5
Commit
9d8081f5
authored
Oct 25, 2011
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Plain Diff
Merge "client: really fix ZODB monkey-patch when DB lock is not acquired"
parents
3e6f9bd8
b709cc89
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
neo/client/__init__.py
neo/client/__init__.py
+4
-6
No files found.
neo/client/__init__.py
View file @
9d8081f5
...
@@ -57,10 +57,10 @@ if 1:
...
@@ -57,10 +57,10 @@ if 1:
###
###
try
:
try
:
if
Connection
.
_nexedi_fix
!=
4
:
if
Connection
.
_nexedi_fix
!=
5
:
raise
Exception
(
"A different ZODB fix is already applied"
)
raise
Exception
(
"A different ZODB fix is already applied"
)
except
AttributeError
:
except
AttributeError
:
Connection
.
_nexedi_fix
=
4
Connection
.
_nexedi_fix
=
5
# Whenever an connection is opened (and there's usually an existing one
# Whenever an connection is opened (and there's usually an existing one
# in DB pool that can be reused) whereas the transaction is already
# in DB pool that can be reused) whereas the transaction is already
...
@@ -69,14 +69,12 @@ if 1:
...
@@ -69,14 +69,12 @@ if 1:
# For example, there's no open transaction when a ZPublisher/Publish
# For example, there's no open transaction when a ZPublisher/Publish
# transaction begins.
# transaction begins.
import
thread
def
open
(
self
,
*
args
,
**
kw
):
def
open
(
self
,
*
args
,
**
kw
):
def
_flush_invalidations
():
def
_flush_invalidations
():
acquire
=
self
.
_db
.
_a
acquire
=
self
.
_db
.
_a
try
:
try
:
self
.
_db
.
_r
()
self
.
_db
.
_r
()
# this is a RLock
except
thread
.
error
:
except
(
AssertionError
,
RuntimeError
):
# old Python uses assert
acquire
=
lambda
:
None
acquire
=
lambda
:
None
try
:
try
:
del
self
.
_flush_invalidations
del
self
.
_flush_invalidations
...
...
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