summaryrefslogtreecommitdiffstats
path: root/Lib/site.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/site.py')
-rw-r--r--Lib/site.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/site.py b/Lib/site.py
index b751006..87687e7 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -369,12 +369,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)