Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r61865:06fa7f1e52c2
Date: 2013-02-27 12:06 -0800
http://bitbucket.org/pypy/pypy/changeset/06fa7f1e52c2/

Log:    fix an obscure issue I broke in 894b0fa3245b

diff --git a/pypy/interpreter/app_main.py b/pypy/interpreter/app_main.py
--- a/pypy/interpreter/app_main.py
+++ b/pypy/interpreter/app_main.py
@@ -640,7 +640,7 @@
     except SystemExit as e:
         status = e.code
         if inspect_requested():
-            display_exception()
+            display_exception(e)
     else:
         status = not success
 
diff --git a/pypy/interpreter/test2/test_app_main.py 
b/pypy/interpreter/test2/test_app_main.py
--- a/pypy/interpreter/test2/test_app_main.py
+++ b/pypy/interpreter/test2/test_app_main.py
@@ -351,6 +351,11 @@
         child.sendline('sys.last_type.__name__')
         child.expect(re.escape(repr('NameError')))
 
+    def test_options_i_c_sysexit(self):
+        child = self.spawn(['-i', '-c', 'import sys; sys.exit(1)'])
+        child.expect('SystemExit: 1')
+        child.expect('>>>')
+
     def test_atexit(self):
         skip("Python3 atexit is a builtin module")
         child = self.spawn([])
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to