Author: Antonio Cuni <[email protected]>
Branch: int_w-refactor
Changeset: r69434:8854c318cb66
Date: 2014-02-25 18:00 +0100
http://bitbucket.org/pypy/pypy/changeset/8854c318cb66/

Log:    this is hard to test, but CPython accepts only actual integers in
        sys.exit()

diff --git a/pypy/interpreter/main.py b/pypy/interpreter/main.py
--- a/pypy/interpreter/main.py
+++ b/pypy/interpreter/main.py
@@ -134,7 +134,7 @@
                     exitcode = 0
                 else:
                     try:
-                        exitcode = space.int_w(w_exitcode)
+                        exitcode = space.int_w(w_exitcode, 
allow_conversion=False)
                     except OperationError:
                         # not an integer: print it to stderr
                         msg = space.str_w(space.str(w_exitcode))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to