[Zope-CVS] CVS: Products/CookieCrumbler - CHANGES.txt:1.14 CookieCrumbler.py:1.21

Shane Hathaway shane at zope.com
Thu Jan 22 11:41:32 EST 2004


Update of /cvs-repository/Products/CookieCrumbler
In directory cvs.zope.org:/tmp/cvs-serv32520

Modified Files:
	CHANGES.txt CookieCrumbler.py 
Log Message:
Made compatible with Zope 2.7 by raising Redirect instances.


=== Products/CookieCrumbler/CHANGES.txt 1.13 => 1.14 ===
--- Products/CookieCrumbler/CHANGES.txt:1.13	Thu Sep 11 11:51:44 2003
+++ Products/CookieCrumbler/CHANGES.txt	Thu Jan 22 11:41:00 2004
@@ -8,6 +8,9 @@
 - The credentialsChanged() method was generating an incorrect cookie.
   Thanks to Richard Jones for finding this elusive bug.
 
+- Made compatible with Zope 2.7 by raising Redirect exception instances
+  rather than a string.
+
 
 Version 1.1
 


=== Products/CookieCrumbler/CookieCrumbler.py 1.20 => 1.21 ===
--- Products/CookieCrumbler/CookieCrumbler.py:1.20	Thu Sep 11 11:51:44 2003
+++ Products/CookieCrumbler/CookieCrumbler.py	Thu Jan 22 11:41:00 2004
@@ -29,6 +29,12 @@
 from ZPublisher.HTTPRequest import HTTPRequest
 from OFS.Folder import Folder
 
+try:
+    from zExceptions import Redirect
+except ImportError:
+    # Pre Zope 2.7
+    Redirect = 'Redirect'
+
 
 # Constants.
 ATTEMPT_NONE = 0       # No attempt at authentication
@@ -255,7 +261,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 Zope-CVS mailing list