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
7821ef3f
Commit
7821ef3f
authored
Dec 06, 2004
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kicking string module
parent
b56bc07d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
lib/python/Products/Sessions/SessionDataManager.py
lib/python/Products/Sessions/SessionDataManager.py
+7
-8
No files found.
lib/python/Products/Sessions/SessionDataManager.py
View file @
7821ef3f
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
############################################################################
############################################################################
import
re
,
time
,
s
tring
,
s
ys
import
re
,
time
,
sys
import
Globals
import
Globals
from
OFS.SimpleItem
import
Item
from
OFS.SimpleItem
import
Item
from
Acquisition
import
Implicit
,
Explicit
,
aq_base
from
Acquisition
import
Implicit
,
Explicit
,
aq_base
...
@@ -23,7 +23,6 @@ from zLOG import LOG, WARNING, BLATHER
...
@@ -23,7 +23,6 @@ from zLOG import LOG, WARNING, BLATHER
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
import
SessionInterfaces
import
SessionInterfaces
from
SessionPermissions
import
*
from
SessionPermissions
import
*
from
types
import
StringType
from
common
import
DEBUG
from
common
import
DEBUG
from
BrowserIdManager
import
isAWellFormedBrowserId
,
getNewBrowserId
,
\
from
BrowserIdManager
import
isAWellFormedBrowserId
,
getNewBrowserId
,
\
BROWSERID_MANAGER_NAME
BROWSERID_MANAGER_NAME
...
@@ -157,7 +156,7 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
...
@@ -157,7 +156,7 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
'
Container
path
contains
characters
invalid
in
a
Zope
'
'
Container
path
contains
characters
invalid
in
a
Zope
'
'
object
path
'
'
object
path
'
)
)
self.obpath =
string.split(path,
'
/
')
self.obpath =
path.split(
'
/
')
elif type(path) in (type([]), type(())):
elif type(path) in (type([]), type(())):
self.obpath = list(path) # sequence
self.obpath = list(path) # sequence
else:
else:
...
@@ -167,7 +166,7 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
...
@@ -167,7 +166,7 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
def getContainerPath(self):
def getContainerPath(self):
""" """
""" """
if self.obpath is not None:
if self.obpath is not None:
return
string.join(self.obpath, '
/
'
)
return
'
/
'.join(self.obpath
)
return '' # blank string represents undefined state
return '' # blank string represents undefined state
def _hasSessionDataObject(self, key):
def _hasSessionDataObject(self, key):
...
@@ -215,7 +214,7 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
...
@@ -215,7 +214,7 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
# unrestrictedTraverse is also much faster.
# unrestrictedTraverse is also much faster.
# hasattr hides conflicts
# hasattr hides conflicts
if DEBUG and not getattr(self, '
_v_wrote_dc_type
', None):
if DEBUG and not getattr(self, '
_v_wrote_dc_type
', None):
args =
string.join(self.obpath, '
/
'
)
args =
'
/
'.join(self.obpath
)
LOG('
Session
Tracking
', BLATHER,
LOG('
Session
Tracking
', BLATHER,
'
External
data
container
at
%
s
in
use
' % args)
'
External
data
container
at
%
s
in
use
' % args)
self._v_wrote_dc_type = 1
self._v_wrote_dc_type = 1
...
@@ -223,7 +222,7 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
...
@@ -223,7 +222,7 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
except:
except:
raise SessionDataManagerErr, (
raise SessionDataManagerErr, (
"External session data container '
%
s
' not found." %
"External session data container '
%
s
' not found." %
string.join(self.obpath,'
/
'
)
'
/
'.join(self.obpath
)
)
)
security.declareProtected(MGMT_SCREEN_PERM, '
getRequestName
')
security.declareProtected(MGMT_SCREEN_PERM, '
getRequestName
')
...
@@ -260,7 +259,7 @@ class SessionDataManagerTraverser(Persistent):
...
@@ -260,7 +259,7 @@ class SessionDataManagerTraverser(Persistent):
self._requestSessionName = requestSessionName
self._requestSessionName = requestSessionName
self._sessionDataManager = sessionDataManagerName
self._sessionDataManager = sessionDataManagerName
def __call__(self, container, request
, StringType=StringType
):
def __call__(self, container, request):
"""
"""
This method places a session data object reference in
This method places a session data object reference in
the request. It is called on each and every request to Zope in
the request. It is called on each and every request to Zope in
...
@@ -269,7 +268,7 @@ class SessionDataManagerTraverser(Persistent):
...
@@ -269,7 +268,7 @@ class SessionDataManagerTraverser(Persistent):
"""
"""
try:
try:
sdmName = self._sessionDataManager
sdmName = self._sessionDataManager
if not isinstance(sdmName,
StringType
):
if not isinstance(sdmName,
str
):
# Zopes v2.5.0 - 2.5.1b1 stuck the actual session data
# Zopes v2.5.0 - 2.5.1b1 stuck the actual session data
# manager object in _sessionDataManager in order to use
# manager object in _sessionDataManager in order to use
# its getSessionData method. We don'
t
actually
want
to
# its getSessionData method. We don'
t
actually
want
to
...
...
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