Log message for revision 115118:
  - removed obsolete upgradeException calls (there are no string exceptions in 
Python 2.6)
  - no need to re-raise Redirect in raise_standardErrorMessage 
(ZPublisherExceptionHook is responsible for that)

Changed:
  U   Zope/trunk/src/OFS/SimpleItem.py
  U   Zope/trunk/src/Zope2/App/startup.py

-=-
Modified: Zope/trunk/src/OFS/SimpleItem.py
===================================================================
--- Zope/trunk/src/OFS/SimpleItem.py    2010-07-27 11:13:40 UTC (rev 115117)
+++ Zope/trunk/src/OFS/SimpleItem.py    2010-07-27 11:21:02 UTC (rev 115118)
@@ -48,7 +48,6 @@
 from Persistence import Persistent
 from webdav.Resource import Resource
 from zExceptions import Redirect
-from zExceptions import upgradeException
 from zExceptions.ExceptionFormatter import format_exception
 from zope.interface import implements
 
@@ -197,25 +196,15 @@
             elif type(tb) is type('') and not error_tb:
                 error_tb = tb
 
-            # warn if error_type is a string
-            error_name = 'Unknown'
-            if isinstance(error_type, basestring):
-                # String Exceptions are deprecated on Python 2.5 and
-                # plain won't work at all on Python 2.6. So try to upgrade it
-                # to a real exception.
-                error_name = error_type
-                error_type, error_value = upgradeException(error_type, 
error_value)
-            else:
-                if hasattr(error_type, '__name__'):
-                    error_name = error_type.__name__
-
             if hasattr(self, '_v_eek'):
                 # Stop if there is recursion.
                 raise error_type, error_value, tb
             self._v_eek = 1
 
-            if error_name.lower() in ('redirect',):
-                raise error_type, error_value, tb
+            if hasattr(error_type, '__name__'):
+                error_name = error_type.__name__
+            else:
+                error_name = 'Unknown'
 
             if not error_message:
                 try:

Modified: Zope/trunk/src/Zope2/App/startup.py
===================================================================
--- Zope/trunk/src/Zope2/App/startup.py 2010-07-27 11:13:40 UTC (rev 115117)
+++ Zope/trunk/src/Zope2/App/startup.py 2010-07-27 11:21:02 UTC (rev 115118)
@@ -27,7 +27,6 @@
 from Acquisition.interfaces import IAcquirer
 from App.config import getConfiguration
 from time import asctime
-from zExceptions import upgradeException
 from zExceptions import Redirect
 from zExceptions import Unauthorized
 from ZODB.POSException import ConflictError
@@ -181,8 +180,6 @@
 
     def __call__(self, published, REQUEST, t, v, traceback):
         try:
-            t, v = upgradeException(t, v)
-
             if t is SystemExit or issubclass(t, Redirect):
                 raise t, v, traceback
 

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to