Author: Tyler Wade <[email protected]>
Branch: 
Changeset: r64755:83e557521804
Date: 2013-04-29 12:20 -0500
http://bitbucket.org/pypy/pypy/changeset/83e557521804/

Log:    Code cleanup (stray print, bad variable name, and bare except)

diff --git a/pypy/interpreter/pycode.py b/pypy/interpreter/pycode.py
--- a/pypy/interpreter/pycode.py
+++ b/pypy/interpreter/pycode.py
@@ -221,9 +221,9 @@
     def remove_docstrings(self, space):
         if self.co_flags & CO_KILL_DOCSTRING:
             self.co_consts_w[0] = space.w_None
-        for co_w in self.co_consts_w:
+        for w_co in self.co_consts_w:
             if isinstance(co_w, PyCode):
-                co_w.remove_docstrings(space)
+                w_co.remove_docstrings(space)
 
     def _to_code(self):
         """For debugging only."""
diff --git a/pypy/module/__pypy__/interp_magic.py 
b/pypy/module/__pypy__/interp_magic.py
--- a/pypy/module/__pypy__/interp_magic.py
+++ b/pypy/module/__pypy__/interp_magic.py
@@ -104,7 +104,6 @@
 
 @unwrap_spec(debug=bool)
 def set_debug(space, debug):
-    print debug
     space.sys.debug = debug
     space.setitem(space.builtin.w_dict,
                   space.wrap('__debug__'),
diff --git a/pypy/module/imp/importing.py b/pypy/module/imp/importing.py
--- a/pypy/module/imp/importing.py
+++ b/pypy/module/imp/importing.py
@@ -915,7 +915,7 @@
 
     try:
         optimize = space.sys.get_flag('optimize')
-    except:
+    except Exception:
         optimize = 0
     if optimize >= 2:
         code_w.remove_docstrings(space)
@@ -1016,7 +1016,7 @@
     code_w = read_compiled_module(space, cpathname, source)
     try:
         optimize = space.sys.get_flag('optimize')
-    except:
+    except Exception:
         optimize = 0
     if optimize >= 2:
         code_w.remove_docstrings(space)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to