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
3bfaa547
Commit
3bfaa547
authored
May 03, 2008
by
Christian Theune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug #184054: MappingStorage used to raise a KeyError during `load`
instead of a POSKeyError.
parent
10e35640
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
src/CHANGES.txt
src/CHANGES.txt
+3
-0
src/ZODB/MappingStorage.py
src/ZODB/MappingStorage.py
+5
-2
src/ZODB/tests/testConnection.py
src/ZODB/tests/testConnection.py
+2
-2
No files found.
src/CHANGES.txt
View file @
3bfaa547
...
@@ -37,6 +37,9 @@ New Features
...
@@ -37,6 +37,9 @@ New Features
Bugs Fixed
Bugs Fixed
----------
----------
- Fix for bug #184054: MappingStorage used to raise a KeyError during `load`
instead of a POSKeyError.
- Fixed bug in Connection.TmpStore: load() would not defer to the backend
- Fixed bug in Connection.TmpStore: load() would not defer to the backend
storage for loading blobs.
storage for loading blobs.
...
...
src/ZODB/MappingStorage.py
View file @
3bfaa547
...
@@ -58,8 +58,11 @@ class MappingStorage(BaseStorage):
...
@@ -58,8 +58,11 @@ class MappingStorage(BaseStorage):
def
load
(
self
,
oid
,
version
):
def
load
(
self
,
oid
,
version
):
self
.
_lock_acquire
()
self
.
_lock_acquire
()
try
:
try
:
p
=
self
.
_index
[
oid
]
try
:
return
p
[
8
:],
p
[:
8
]
# pickle, serial
p
=
self
.
_index
[
oid
]
return
p
[
8
:],
p
[:
8
]
# pickle, serial
except
KeyError
:
raise
POSException
.
POSKeyError
(
oid
)
finally
:
finally
:
self
.
_lock_release
()
self
.
_lock_release
()
...
...
src/ZODB/tests/testConnection.py
View file @
3bfaa547
...
@@ -209,12 +209,12 @@ class UserMethodTests(unittest.TestCase):
...
@@ -209,12 +209,12 @@ class UserMethodTests(unittest.TestCase):
>>> obj._p_state
>>> obj._p_state
0
0
A request for an object that doesn't exist will raise a KeyError.
A request for an object that doesn't exist will raise a
POS
KeyError.
>>> cn.get(p64(1))
>>> cn.get(p64(1))
Traceback (most recent call last):
Traceback (most recent call last):
...
...
KeyError: '\x00\x00\x00\x00\x00\x00\x00\x01'
POSKeyError: 0x01
"""
"""
def
test_close
(
self
):
def
test_close
(
self
):
...
...
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