mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
#17585: merge with 3.3.
This commit is contained in:
commit
663a390454
3 changed files with 6 additions and 6 deletions
|
@ -350,12 +350,7 @@ def setquit():
|
|||
# Shells like IDLE catch the SystemExit, but listen when their
|
||||
# stdin wrapper is closed.
|
||||
try:
|
||||
fd = -1
|
||||
if hasattr(sys.stdin, "fileno"):
|
||||
fd = sys.stdin.fileno()
|
||||
if fd != 0:
|
||||
# Don't close stdin if it wraps fd 0
|
||||
sys.stdin.close()
|
||||
sys.stdin.close()
|
||||
except:
|
||||
pass
|
||||
raise SystemExit(code)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue