[pypy-commit] pypy py3k: more StandardError killing

pjenvey noreply at buildbot.pypy.org
Wed Dec 5 20:33:49 CET 2012


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r59328:f6afbec13172
Date: 2012-12-05 11:25 -0800
http://bitbucket.org/pypy/pypy/changeset/f6afbec13172/

Log:	more StandardError killing

diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -1643,7 +1643,6 @@
     'OverflowError',
     'ReferenceError',
     'RuntimeError',
-    'StandardError',
     'StopIteration',
     'SyntaxError',
     'SystemError',
diff --git a/pypy/interpreter/test/test_exceptcomp.py b/pypy/interpreter/test/test_exceptcomp.py
--- a/pypy/interpreter/test/test_exceptcomp.py
+++ b/pypy/interpreter/test/test_exceptcomp.py
@@ -80,7 +80,7 @@
     def test_parenttuple(self):
         try:
             raise ZeroDivisionError("0")
-        except (StandardError, SystemExit):
+        except (Exception, SystemExit):
             pass
         except:
             self.fail("Exception does not match parent in tuple.") 
diff --git a/pypy/module/clr/interp_clr.py b/pypy/module/clr/interp_clr.py
--- a/pypy/module/clr/interp_clr.py
+++ b/pypy/module/clr/interp_clr.py
@@ -60,8 +60,8 @@
     except TargetInvocationException, e:
         b_inner = native_exc(e).get_InnerException()
         message = str(b_inner.get_Message())
-        # TODO: use the appropriate exception, not StandardError
-        raise OperationError(space.w_StandardError, space.wrap(message))
+        # TODO: use the appropriate exception, not Exception
+        raise OperationError(space.w_Exception, space.wrap(message))
     if b_meth.get_ReturnType().get_Name() == 'Void':
         return space.w_None
     else:
@@ -346,8 +346,8 @@
     except TargetInvocationException, e:
         b_inner = native_exc(e).get_InnerException()
         message = str(b_inner.get_Message())
-        # TODO: use the appropriate exception, not StandardError
-        raise OperationError(space.w_StandardError, space.wrap(message))
+        # TODO: use the appropriate exception, not Exception
+        raise OperationError(space.w_Exception, space.wrap(message))
     return space.wrap(W_CliObject(space, b_obj))
 
 W_CliObject.typedef = TypeDef(
diff --git a/pypy/module/clr/test/test_clr.py b/pypy/module/clr/test/test_clr.py
--- a/pypy/module/clr/test/test_clr.py
+++ b/pypy/module/clr/test/test_clr.py
@@ -44,7 +44,7 @@
         import clr
         ArrayList = clr.load_cli_class(self.mscorlib, 'System.Collections', 'ArrayList')
         obj = ArrayList()
-        raises(StandardError, obj.get_Item, 0)
+        raises(Exception, obj.get_Item, 0)
 
     def test_float_conversion(self):
         import clr
diff --git a/pypy/module/oracle/app_oracle.py b/pypy/module/oracle/app_oracle.py
--- a/pypy/module/oracle/app_oracle.py
+++ b/pypy/module/oracle/app_oracle.py
@@ -1,10 +1,10 @@
 version = '5.0.0'
 paramstyle = 'named'
 
-class Warning(StandardError):
+class Warning(Exception):
     pass
 
-class Error(StandardError):
+class Error(Exception):
     pass
 
 class InterfaceError(Error):


More information about the pypy-commit mailing list