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
6f2d9bf5
Commit
6f2d9bf5
authored
May 20, 2004
by
Chris McDonough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge from 2.7 branch: hasattr hides conflict errors.
parent
5c95b165
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
lib/python/Products/Sessions/SessionDataManager.py
lib/python/Products/Sessions/SessionDataManager.py
+6
-3
No files found.
lib/python/Products/Sessions/SessionDataManager.py
View file @
6f2d9bf5
...
...
@@ -178,7 +178,8 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
""" returns new or existing session data object """
container = self._getSessionDataContainer()
ob = container.new_or_existing(key)
if hasattr(ob, '
__of__
') and hasattr(ob, '
aq_parent
'):
# hasattr hides conflicts
if getattr(ob, '
__of__
', None) and getattr(ob, '
aq_parent
', None):
# splice ourselves into the acquisition chain
return ob.__of__(self.__of__(ob.aq_parent))
return ob.__of__(self)
...
...
@@ -188,7 +189,8 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
container = self._getSessionDataContainer()
ob = container.get(key)
if ob is not None:
if hasattr(ob, '
__of__
') and hasattr(ob, '
aq_parent
'):
# hasattr hides conflicts
if getattr(ob, '
__of__
', None) and getattr(ob, '
aq_parent
', None):
# splice ourselves into the acquisition chain
return ob.__of__(self.__of__(ob.aq_parent))
return ob.__of__(self)
...
...
@@ -205,7 +207,8 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
# currently fails for mounted storages. This might
# be construed as a security hole, albeit a minor one.
# unrestrictedTraverse is also much faster.
if DEBUG and not hasattr(self, '
_v_wrote_dc_type
'):
# hasattr hides conflicts
if DEBUG and not getattr(self, '
_v_wrote_dc_type
', None):
args = string.join(self.obpath, '
/
')
LOG('
Session
Tracking
', BLATHER,
'
External
data
container
at
%
s
in
use
' % args)
...
...
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