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
Kirill Smelkov
ZODB
Commits
48874b2e
Commit
48874b2e
authored
Mar 28, 2002
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace more KeyErrors with POSKeyErrors
parent
e7e18db7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
src/ZODB/FileStorage.py
src/ZODB/FileStorage.py
+10
-6
No files found.
src/ZODB/FileStorage.py
View file @
48874b2e
...
...
@@ -115,7 +115,7 @@
# may have a back pointer to a version record or to a non-version
# record.
#
__version__
=
'$Revision: 1.8
2
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.8
3
$'
[
11
:
-
2
]
import
struct
,
time
,
os
,
string
,
base64
,
sys
from
struct
import
pack
,
unpack
...
...
@@ -578,18 +578,19 @@ class FileStorage(BaseStorage.BaseStorage,
def
load
(
self
,
oid
,
version
,
_stuff
=
None
):
self
.
_lock_acquire
()
try
:
return
self
.
_load
(
oid
,
version
,
self
.
_index
,
self
.
_file
)
finally
:
self
.
_lock_release
()
try
:
return
self
.
_load
(
oid
,
version
,
self
.
_index
,
self
.
_file
)
finally
:
self
.
_lock_release
()
def
loadSerial
(
self
,
oid
,
serial
):
self
.
_lock_acquire
()
try
:
_index
=
self
.
_index
file
=
self
.
_file
seek
=
file
.
seek
read
=
file
.
read
try
:
pos
=
_index
[
oid
]
pos
=
self
.
_index
[
oid
]
except
KeyError
:
raise
POSKeyError
(
oid
)
while
1
:
...
...
@@ -619,7 +620,10 @@ class FileStorage(BaseStorage.BaseStorage,
def
modifiedInVersion
(
self
,
oid
):
self
.
_lock_acquire
()
try
:
pos
=
self
.
_index
[
oid
]
try
:
pos
=
self
.
_index
[
oid
]
except
KeyError
:
raise
POSKeyError
(
oid
)
file
=
self
.
_file
seek
=
file
.
seek
seek
(
pos
)
...
...
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