Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Kirill Smelkov
Zope
Commits
684759a0
Commit
684759a0
authored
Nov 08, 2001
by
matt@zope.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make has_key just report success of self.get() with isValid() on success
parent
b7e21335
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
lib/python/Products/Transience/Transience.py
lib/python/Products/Transience/Transience.py
+3
-5
No files found.
lib/python/Products/Transience/Transience.py
View file @
684759a0
...
...
@@ -85,10 +85,10 @@
"""
Core session tracking SessionData class.
$Id: Transience.py,v 1.1
5 2001/11/08 21:15:28
matt Exp $
$Id: Transience.py,v 1.1
6 2001/11/08 21:20:41
matt Exp $
"""
__version__
=
'$Revision: 1.1
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
6
$'
[
11
:
-
2
]
import
Globals
from
Globals
import
HTMLFile
,
MessageDialog
...
...
@@ -518,9 +518,7 @@ class TransientObjectContainer(SimpleItem):
security
.
declareProtected
(
ACCESS_TRANSIENTS_PERM
,
'has_key'
)
def
has_key
(
self
,
k
):
self
.
_getCurrentBucket
()
index
=
self
.
_ring
.
_index
v
=
index
.
get
(
k
,
_notfound
)
v
=
self
.
get
(
k
,
_notfound
)
if
v
is
_notfound
or
not
v
.
isValid
():
return
0
return
1
...
...
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