Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
f85a965a
Commit
f85a965a
authored
Mar 17, 2003
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix one NameError and add grumbly comment about try/except that masked it.
parent
95f5f396
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 @
f85a965a
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
# may have a back pointer to a version record or to a non-version
# may have a back pointer to a version record or to a non-version
# record.
# record.
#
#
__version__
=
'$Revision: 1.12
7
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.12
8
$'
[
11
:
-
2
]
import
base64
import
base64
from
cPickle
import
Pickler
,
Unpickler
,
loads
from
cPickle
import
Pickler
,
Unpickler
,
loads
...
@@ -604,14 +604,15 @@ class FileStorage(BaseStorage.BaseStorage,
...
@@ -604,14 +604,15 @@ class FileStorage(BaseStorage.BaseStorage,
h
=
read
(
DATA_HDR_LEN
)
h
=
read
(
DATA_HDR_LEN
)
doid
,
serial
,
prev
,
tloc
,
vlen
,
plen
=
unpack
(
DATA_HDR
,
h
)
doid
,
serial
,
prev
,
tloc
,
vlen
,
plen
=
unpack
(
DATA_HDR
,
h
)
if
vlen
:
if
vlen
:
assert
read
(
8
)
!=
z64
nv
=
u64
(
read
(
8
))
read
(
8
)
# Skip previous version record pointer
read
(
8
)
# Skip previous version record pointer
version
=
read
(
vlen
)
version
=
read
(
vlen
)
else
:
else
:
version
=
''
version
=
''
nv
=
0
nv
=
0
if
plen
!=
z64
:
return
read
(
u64
(
plen
)),
version
,
nv
if
plen
!=
z64
:
return
read
(
u64
(
plen
)),
version
,
nv
return
_loadBack
(
file
,
oid
,
read
(
8
))[
0
],
version
,
nv
return
_loadBack
(
file
,
oid
,
read
(
8
))[
0
],
version
,
nv
def
_load
(
self
,
oid
,
version
,
_index
,
file
):
def
_load
(
self
,
oid
,
version
,
_index
,
file
):
...
@@ -1497,6 +1498,8 @@ class FileStorage(BaseStorage.BaseStorage,
...
@@ -1497,6 +1498,8 @@ class FileStorage(BaseStorage.BaseStorage,
except
:
except
:
pindex
[
oid
]
=
0
pindex
[
oid
]
=
0
error
(
'Bad reference to %s'
,
`(oid,v)`
)
error
(
'Bad reference to %s'
,
`(oid,v)`
)
# XXX This try/except frequently masks bugs in the
# implementation.
##################################################################
##################################################################
# Step 2, copy data and compute new index based on new positions.
# Step 2, copy data and compute new index based on new positions.
...
@@ -2349,6 +2352,7 @@ class FileIterator(Iterator):
...
@@ -2349,6 +2352,7 @@ class FileIterator(Iterator):
h
=
read
(
TRANS_HDR_LEN
)
h
=
read
(
TRANS_HDR_LEN
)
if
len
(
h
)
<
TRANS_HDR_LEN
:
break
if
len
(
h
)
<
TRANS_HDR_LEN
:
break
tid
,
stl
,
status
,
ul
,
dl
,
el
=
unpack
(
TRANS_HDR
,
h
)
tid
,
stl
,
status
,
ul
,
dl
,
el
=
unpack
(
TRANS_HDR
,
h
)
if
el
<
0
:
el
=
t32
-
el
if
el
<
0
:
el
=
t32
-
el
...
...
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