Commit 7821ef3f authored by Andreas Jung's avatar Andreas Jung

kicking string module

parent b56bc07d
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
############################################################################ ############################################################################
import re, time, string, sys 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment