[pypy-commit] pypy default: modify exception to OperationError

wenzhuman noreply at buildbot.pypy.org
Wed May 28 22:05:43 CEST 2014


Author: wenzhuman <manwenzhu at gamil.com>
Branch: 
Changeset: r71768:49cf2e600e22
Date: 2014-03-31 22:55 -0400
http://bitbucket.org/pypy/pypy/changeset/49cf2e600e22/

Log:	modify exception to OperationError

diff --git a/pypy/interpreter/astcompiler/ast.py b/pypy/interpreter/astcompiler/ast.py
--- a/pypy/interpreter/astcompiler/ast.py
+++ b/pypy/interpreter/astcompiler/ast.py
@@ -52,7 +52,7 @@
             try:
                 space.setitem(w_dict, w_name,
                           space.getattr(self, w_name))
-            except Exception:
+            except OperationError:
                 pass
         w_attrs = space.findattr(w_type, space.wrap("_attributes"))
         if w_attrs:
@@ -60,7 +60,7 @@
                 try:
                     space.setitem(w_dict, w_name,
                               space.getattr(self, w_name))
-                except Exception:
+                except OperationError:
                     pass
         return space.newtuple([space.type(self),
                                space.newtuple([]),
diff --git a/pypy/interpreter/astcompiler/tools/asdl_py.py b/pypy/interpreter/astcompiler/tools/asdl_py.py
--- a/pypy/interpreter/astcompiler/tools/asdl_py.py
+++ b/pypy/interpreter/astcompiler/tools/asdl_py.py
@@ -600,7 +600,7 @@
             try:
                 space.setitem(w_dict, w_name,
                           space.getattr(self, w_name))
-            except Exception:
+            except OperationError:
                 pass
         w_attrs = space.findattr(w_type, space.wrap("_attributes"))
         if w_attrs:
@@ -608,7 +608,7 @@
                 try:
                     space.setitem(w_dict, w_name,
                               space.getattr(self, w_name))
-                except Exception:
+                except OperationError:
                     pass
         return space.newtuple([space.type(self),
                                space.newtuple([]),


More information about the pypy-commit mailing list