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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
ZODB
Commits
af21bded
Commit
af21bded
authored
Dec 13, 2002
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update a comment about prev_txn
FileIterator.__len__(): Add this for Python 2.1 support.
parent
8785d58f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
src/ZODB/FileStorage.py
src/ZODB/FileStorage.py
+14
-3
No files found.
src/ZODB/FileStorage.py
View file @
af21bded
...
@@ -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
2
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.12
3
$'
[
11
:
-
2
]
import
base64
import
base64
from
cPickle
import
Pickler
,
Unpickler
,
loads
from
cPickle
import
Pickler
,
Unpickler
,
loads
...
@@ -775,8 +775,14 @@ class FileStorage(BaseStorage.BaseStorage,
...
@@ -775,8 +775,14 @@ class FileStorage(BaseStorage.BaseStorage,
# - data can be None, which indicates a George Bailey object
# - data can be None, which indicates a George Bailey object
# (i.e. one who's creation has been transactionally undone).
# (i.e. one who's creation has been transactionally undone).
#
#
# If prev_txn is not None, it should contain the same data as
# prev_txn is a backpointer. In the original database, it's possible
# the argument data. If it does, write a backpointer to it.
# that the data was actually living in a previous transaction. This
# can happen for transactional undo and other operations, and is used
# as a space saving optimization. Under some circumstances the
# prev_txn may not actually exist in the target database (i.e. self)
# for example, if it's been packed away. In that case, the prev_txn
# should be considered just a hint, and is ignored if the transaction
# doesn't exist.
if
self
.
_is_read_only
:
if
self
.
_is_read_only
:
raise
POSException
.
ReadOnlyError
()
raise
POSException
.
ReadOnlyError
()
if
transaction
is
not
self
.
_transaction
:
if
transaction
is
not
self
.
_transaction
:
...
@@ -2216,6 +2222,11 @@ class FileIterator(Iterator):
...
@@ -2216,6 +2222,11 @@ class FileIterator(Iterator):
self
.
_skip_to_start
(
start
)
self
.
_skip_to_start
(
start
)
self
.
_stop
=
stop
self
.
_stop
=
stop
def
__len__
(
self
):
# This is a lie. It's here only for Python 2.1 support for
# list()-ifying these objects.
return
0
def
close
(
self
):
def
close
(
self
):
file
=
self
.
_file
file
=
self
.
_file
if
file
is
not
None
:
if
file
is
not
None
:
...
...
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