[Checkins] SVN: Products.PluggableAuthService/trunk/ Raise new-style exceptions.
Hanno Schlichting
hannosch at hannosch.eu
Sat Jun 12 06:42:26 EDT 2010
Log message for revision 113377:
Raise new-style exceptions.
Changed:
U Products.PluggableAuthService/trunk/CHANGES.txt
U Products.PluggableAuthService/trunk/Products/PluggableAuthService/__init__.py
U Products.PluggableAuthService/trunk/Products/PluggableAuthService/tests/test_PluggableAuthService.py
-=-
Modified: Products.PluggableAuthService/trunk/CHANGES.txt
===================================================================
--- Products.PluggableAuthService/trunk/CHANGES.txt 2010-06-12 10:20:08 UTC (rev 113376)
+++ Products.PluggableAuthService/trunk/CHANGES.txt 2010-06-12 10:42:26 UTC (rev 113377)
@@ -4,6 +4,8 @@
1.7.1 (unreleased)
------------------
+- Raise new-style exceptions.
+
- Avoid dependency on zope.app.testing.
- Cleaned out a number of old imports, we require Zope >= 2.12.
Modified: Products.PluggableAuthService/trunk/Products/PluggableAuthService/__init__.py
===================================================================
--- Products.PluggableAuthService/trunk/Products/PluggableAuthService/__init__.py 2010-06-12 10:20:08 UTC (rev 113376)
+++ Products.PluggableAuthService/trunk/Products/PluggableAuthService/__init__.py 2010-06-12 10:42:26 UTC (rev 113377)
@@ -89,7 +89,7 @@
if IPluggableAuthService.providedBy(acl_users):
acl_users.resetCredentials(REQUEST, RESPONSE)
else:
- raise Unauthorized, '<p>You have been logged out.</p>'
+ raise Unauthorized('<p>You have been logged out.</p>')
RESPONSE.setStatus(401)
RESPONSE.setBody("""<html>
Modified: Products.PluggableAuthService/trunk/Products/PluggableAuthService/tests/test_PluggableAuthService.py
===================================================================
--- Products.PluggableAuthService/trunk/Products/PluggableAuthService/tests/test_PluggableAuthService.py 2010-06-12 10:20:08 UTC (rev 113376)
+++ Products.PluggableAuthService/trunk/Products/PluggableAuthService/tests/test_PluggableAuthService.py 2010-06-12 10:42:26 UTC (rev 113377)
@@ -266,7 +266,7 @@
def unauthorized(self):
self._unauthorized()
- raise Unauthorized, 'You can not do this!'
+ raise Unauthorized('You can not do this!')
def exception(self):
self._unauthorized()
More information about the checkins
mailing list