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
c7cacdb7
Commit
c7cacdb7
authored
Apr 17, 2009
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove trailing whitespace.
parent
9c7cc1e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
src/ZODB/Connection.py
src/ZODB/Connection.py
+13
-13
No files found.
src/ZODB/Connection.py
View file @
c7cacdb7
...
...
@@ -87,10 +87,10 @@ class Connection(ExportImport, object):
self
.
_debug_info
=
()
self
.
_db
=
db
# historical connection
self
.
before
=
before
# Multi-database support
self
.
connections
=
{
self
.
_db
.
database_name
:
self
}
...
...
@@ -228,7 +228,7 @@ class Connection(ExportImport, object):
return
obj
obj
=
self
.
_added
.
get
(
oid
,
None
)
if
obj
is
not
None
:
return
obj
return
obj
obj
=
self
.
_pre_cache
.
get
(
oid
,
None
)
if
obj
is
not
None
:
return
obj
...
...
@@ -533,7 +533,7 @@ class Connection(ExportImport, object):
def
_commit
(
self
,
transaction
):
"""Commit changes to an object"""
if
self
.
before
is
not
None
:
raise
ReadOnlyHistoryError
()
...
...
@@ -553,7 +553,7 @@ class Connection(ExportImport, object):
self
.
_added_during_commit
=
[]
if
self
.
_invalidatedCache
:
raise
ConflictError
()
raise
ConflictError
()
for
obj
in
self
.
_registered_objects
:
oid
=
obj
.
_p_oid
...
...
@@ -595,7 +595,7 @@ class Connection(ExportImport, object):
or
self
.
_savepoint_storage
.
creating
[
oid
]
)
):
# obj is a new object
# Because obj was added, it is now in _creating, so it
...
...
@@ -616,7 +616,7 @@ class Connection(ExportImport, object):
if
isinstance
(
obj
,
Blob
):
if
not
IBlobStorage
.
providedBy
(
self
.
_storage
):
raise
Unsupported
(
"Storing Blobs in %s is not supported."
%
"Storing Blobs in %s is not supported."
%
repr
(
self
.
_storage
))
if
obj
.
opened
():
raise
ValueError
(
"Can't commit with opened blobs."
)
...
...
@@ -829,7 +829,7 @@ class Connection(ExportImport, object):
# 3. Raise ConflictError.
# Does anything actually use _p_independent()? It would simplify
# the code if we could drop support for it.
# the code if we could drop support for it.
# (BTrees.Length does.)
...
...
@@ -840,7 +840,7 @@ class Connection(ExportImport, object):
if
t
is
None
:
raise
POSKeyError
()
# historical connection!
p
,
serial
,
end
=
t
else
:
# There is a harmless data race with self._invalidated. A
# dict update could go on in another thread, but we don't care
...
...
@@ -848,22 +848,22 @@ class Connection(ExportImport, object):
if
self
.
_invalidatedCache
:
raise
ReadConflictError
()
if
(
obj
.
_p_oid
in
self
.
_invalidated
and
not
myhasattr
(
obj
,
"_p_independent"
)):
# If the object has _p_independent(), we will handle it below.
self
.
_load_before_or_conflict
(
obj
)
return
p
,
serial
=
self
.
_storage
.
load
(
obj
.
_p_oid
,
''
)
self
.
_load_count
+=
1
self
.
_inv_lock
.
acquire
()
try
:
invalid
=
obj
.
_p_oid
in
self
.
_invalidated
finally
:
self
.
_inv_lock
.
release
()
if
invalid
:
if
myhasattr
(
obj
,
"_p_independent"
):
# This call will raise a ReadConflictError if something
...
...
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