SVN: Zope/trunk/src/OFS/Application.py Use Python's current `raise` syntax

Hanno Schlichting <[email protected]>
Newsgroups gmane.comp.web.zope.cvs
Message-ID <[email protected]>
Log message for revision 122098:
  Use Python's current `raise` syntax
  

Changed:
  U   Zope/trunk/src/OFS/Application.py

-=-
Modified: Zope/trunk/src/OFS/Application.py
===================================================================
--- Zope/trunk/src/OFS/Application.py	2011-07-03 16:22:35 UTC (rev 122097)
+++ Zope/trunk/src/OFS/Application.py	2011-07-03 16:24:42 UTC (rev 122098)
@@ -105,8 +105,8 @@
     def Redirect(self, destination, URL1):
         """Utility function to allow user-controlled redirects"""
         if destination.find('//') >= 0:
-            raise RedirectException, destination
-        raise RedirectException, ("%s/%s" % (URL1, destination))
+            raise RedirectException(destination)
+        raise RedirectException("%s/%s" % (URL1, destination))
 
     ZopeRedirect = Redirect
 
@@ -132,7 +132,7 @@
         try:
             REQUEST.RESPONSE.notFoundError("%s\n%s" % (name, method))
         except AttributeError:
-            raise KeyError, name
+            raise KeyError(name)
 
     def ZopeTime(self, *args):
         """Utility function to return current date/time"""
@@ -141,12 +141,12 @@
     def DELETE(self, REQUEST, RESPONSE):
         """Delete a resource object."""
         self.dav__init(REQUEST, RESPONSE)
-        raise Forbidden, 'This resource cannot be deleted.'
+        raise Forbidden('This resource cannot be deleted.')
 
     def MOVE(self, REQUEST, RESPONSE):
         """Move a resource to a new location."""
         self.dav__init(REQUEST, RESPONSE)
-        raise Forbidden, 'This resource cannot be moved.'
+        raise Forbidden('This resource cannot be moved.')
 
     def absolute_url(self, relative=0):
         """The absolute URL of the root object is BASE1 or "/".

_______________________________________________
Zope-Checkins maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-checkins
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.