[CMF-checkins] CVS: CMF/CMFCore - CookieCrumbler.py:1.27
DEPENDENCIES.txt:1.2 DirectoryView.py:1.45 exceptions.py:1.4
Yvo Schubbe
y.2004_ at wcm-solutions.de
Tue Jun 1 06:37:23 EDT 2004
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv22745/CMFCore
Modified Files:
CookieCrumbler.py DEPENDENCIES.txt DirectoryView.py
exceptions.py
Log Message:
- removed pre Zope 2.7.0 compatibility code
=== CMF/CMFCore/CookieCrumbler.py 1.26 => 1.27 ===
--- CMF/CMFCore/CookieCrumbler.py:1.26 Thu Feb 5 10:39:10 2004
+++ CMF/CMFCore/CookieCrumbler.py Tue Jun 1 06:36:52 2004
@@ -28,12 +28,7 @@
from zLOG import LOG, ERROR
from ZPublisher.HTTPRequest import HTTPRequest
from OFS.Folder import Folder
-
-try:
- from zExceptions import Redirect
-except ImportError:
- # Pre Zope 2.7
- Redirect = 'Redirect'
+from zExceptions import Redirect
# Constants.
=== CMF/CMFCore/DEPENDENCIES.txt 1.1 => 1.2 ===
--- CMF/CMFCore/DEPENDENCIES.txt:1.1 Tue May 4 05:41:48 2004
+++ CMF/CMFCore/DEPENDENCIES.txt Tue Jun 1 06:36:52 2004
@@ -1 +1 @@
-Zope >= 2.6.4
+Zope >= 2.7.0
=== CMF/CMFCore/DirectoryView.py 1.44 => 1.45 ===
--- CMF/CMFCore/DirectoryView.py:1.44 Mon May 17 09:22:47 2004
+++ CMF/CMFCore/DirectoryView.py Tue Jun 1 06:36:52 2004
@@ -19,7 +19,6 @@
from os import path, listdir, stat
from sys import exc_info
from sys import platform
-from types import StringType
from AccessControl import ClassSecurityInfo
from Acquisition import aq_inner, aq_parent
@@ -249,15 +248,6 @@
ERROR,
'Error setting permissions',
error=exc_info())
- except:
- # for Zope versions before 2.7.0
- if exc_info()[0] == 'Invalid Permission':
- LOG('DirectoryView',
- ERROR,
- 'Error setting permissions',
- error=exc_info())
- else:
- raise
# only DTML Methods can have proxy roles
if hasattr(ob, '_proxy_roles'):
@@ -298,7 +288,7 @@
def registerDirectory(self, name, _prefix, subdirs=1):
# This what is actually called to register a
# file system directory to become a FSDV.
- if not isinstance(_prefix, StringType):
+ if not isinstance(_prefix, basestring):
_prefix = package_home(_prefix)
filepath = path.join(_prefix, name)
self.registerDirectoryByPath(filepath, subdirs)
@@ -498,7 +488,7 @@
still needs to be called by product initialization code to satisfy
persistence demands.
"""
- if not isinstance(_prefix, StringType):
+ if not isinstance(_prefix, basestring):
_prefix = package_home(_prefix)
filepath = path.join(_prefix, name)
minimal_fp = minimalpath(filepath)
=== CMF/CMFCore/exceptions.py 1.3 => 1.4 ===
--- CMF/CMFCore/exceptions.py:1.3 Wed May 5 10:18:23 2004
+++ CMF/CMFCore/exceptions.py Tue Jun 1 06:36:52 2004
@@ -19,23 +19,9 @@
from AccessControl import Unauthorized as AccessControl_Unauthorized
from OFS.CopySupport import CopyError
from webdav.Lockable import ResourceLockedError
+from zExceptions import BadRequest
+from zExceptions import NotFound
from zExceptions import Unauthorized as zExceptions_Unauthorized
-
-try:
- from zExceptions import BadRequest
-except ImportError:
- # for Zope versions before 2.7.0
-
- class BadRequest(Exception):
- pass
-
-try:
- from zExceptions import NotFound
-except ImportError:
- # for Zope versions before 2.7.0
-
- class NotFound(Exception):
- pass
security = ModuleSecurityInfo('Products.CMFCore.exceptions')
More information about the CMF-checkins
mailing list