[pypy-svn] r5090 - pypy/trunk/src/pypy/interpreter

arigo at codespeak.net arigo at codespeak.net
Tue Jun 15 22:00:18 CEST 2004


Author: arigo
Date: Tue Jun 15 22:00:11 2004
New Revision: 5090

Modified:
   pypy/trunk/src/pypy/interpreter/main.py
Log:
Pseudo-random hacking at the main.py + py.py + interactive.py mess until the
'-i' option works even in the case of exceptions.


Modified: pypy/trunk/src/pypy/interpreter/main.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/main.py	(original)
+++ pypy/trunk/src/pypy/interpreter/main.py	Tue Jun 15 22:00:11 2004
@@ -24,18 +24,18 @@
 
         mainmodule = module.Module(space, space.wrap("__main__"))
         w_globals = mainmodule.w_dict
-       
-    except OperationError, operationerr:
-        operationerr.record_interpreter_traceback()
-        raise PyPyError(space, operationerr)
-    else:
+
         pycode = space.unwrap(w_code)
         retval = pycode.exec_code(space, w_globals, w_globals)
         if eval:
             return retval
         else:
             return
-    
+
+    except OperationError, operationerr:
+        operationerr.record_interpreter_traceback()
+        raise PyPyError(space, operationerr)
+
 def run_string(source, filename='<string>', space=None):
     _run_eval_string(source, filename, space, False)
 



More information about the Pypy-commit mailing list