[pypy-commit] pypy py3k: avoid running in an exception handler, since raising will chain exceptions
mattip
noreply at buildbot.pypy.org
Sun Apr 13 23:33:40 CEST 2014
Author: Matti Picus <matti.picus at gmail.com>
Branch: py3k
Changeset: r70622:1ddaf3502eda
Date: 2014-04-14 00:32 +0300
http://bitbucket.org/pypy/pypy/changeset/1ddaf3502eda/
Log: avoid running in an exception handler, since raising will chain
exceptions
diff --git a/lib_pypy/_pypy_interact.py b/lib_pypy/_pypy_interact.py
--- a/lib_pypy/_pypy_interact.py
+++ b/lib_pypy/_pypy_interact.py
@@ -25,6 +25,7 @@
except ImportError:
pass
#
+ run_interactive = run_simple_interactive_console
try:
if not os.isatty(sys.stdin.fileno()):
# Bail out if stdin is not tty-like, as pyrepl wouldn't be happy
@@ -35,13 +36,12 @@
if not check():
raise ImportError
from pyrepl.simple_interact import run_multiline_interactive_console
+ run_imteractive = run_multiline_interactive_console
except ImportError:
- run_simple_interactive_console(mainmodule)
+ pass
except SyntaxError:
print("Warning: 'import pyrepl' failed with SyntaxError")
- run_simple_interactive_console(mainmodule)
- else:
- run_multiline_interactive_console(mainmodule)
+ run_interactive(mainmodule)
def run_simple_interactive_console(mainmodule):
import code
More information about the pypy-commit
mailing list