Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r55243:c3c6f4f21698
Date: 2012-05-31 16:54 +0200
http://bitbucket.org/pypy/pypy/changeset/c3c6f4f21698/
Log: baaaah. Veeery subtle difference wrt python2
diff --git a/pypy/module/sys/app.py b/pypy/module/sys/app.py
--- a/pypy/module/sys/app.py
+++ b/pypy/module/sys/app.py
@@ -51,9 +51,12 @@
If the exitcode is numeric, it will be used as the system exit status.
If it is another kind of object, it will be printed and the system
exit status will be one (i.e., failure)."""
- # note that we cannot use SystemExit(exitcode) here.
- # The comma version leads to an extra de-tupelizing
+ # note that we cannot simply use SystemExit(exitcode) here.
+ # in the default branch, we use "raise SystemExit, exitcode",
+ # which leads to an extra de-tupelizing
# in normalize_exception, which is exactly like CPython's.
+ if isinstance(exitcode, tuple):
+ raise SystemExit(*exitcode)
raise SystemExit(exitcode)
#import __builtin__
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit