[CMF-checkins] CVS: CMF/CMFCore - CookieCrumbler.py:1.25

Shane Hathaway shane at zope.com
Thu Jan 22 11:43:50 EST 2004


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv684

Modified Files:
	CookieCrumbler.py 
Log Message:
Made compatible with Zope 2.7.


=== CMF/CMFCore/CookieCrumbler.py 1.24 => 1.25 ===
--- CMF/CMFCore/CookieCrumbler.py:1.24	Fri Dec  5 17:16:12 2003
+++ CMF/CMFCore/CookieCrumbler.py	Thu Jan 22 11:43:49 2004
@@ -31,6 +31,12 @@
 from CMFCorePermissions import ViewManagementScreens
 from utils import SimpleItemWithProperties
 
+try:
+    from zExceptions import Redirect
+except ImportError:
+    # Pre Zope 2.7
+    Redirect = 'Redirect'
+
 
 # Constants.
 ATTEMPT_NONE = 0       # No attempt at authentication
@@ -251,7 +257,7 @@
         # Redirect if desired.
         url = self.getUnauthorizedURL()
         if url is not None:
-            raise 'Redirect', url
+            raise Redirect, url
         # Fall through to the standard unauthorized() call.
         resp.unauthorized()
 




More information about the CMF-checkins mailing list