Author: wenzhuman <[email protected]>
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([]),
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to