File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1365,6 +1365,9 @@ def readline(self, size=-1):
13651365 self ._line_buffer = line [size :]
13661366 return line [:size ]
13671367
1368+ def close (self ):
1369+ self .shell .close ()
1370+
13681371
13691372usage_msg = """\
13701373
Original file line number Diff line number Diff line change @@ -369,12 +369,7 @@ def __call__(self, code=None):
369369 # Shells like IDLE catch the SystemExit, but listen when their
370370 # stdin wrapper is closed.
371371 try :
372- fd = - 1
373- if hasattr (sys .stdin , "fileno" ):
374- fd = sys .stdin .fileno ()
375- if fd != 0 :
376- # Don't close stdin if it wraps fd 0
377- sys .stdin .close ()
372+ sys .stdin .close ()
378373 except :
379374 pass
380375 raise SystemExit (code )
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ Library
4646IDLE
4747----
4848
49+ - Issue #17585: Fixed IDLE regression. Now closes when using exit() or quit().
50+
4951- Issue #17657: Show full Tk version in IDLE's about dialog.
5052 Patch by Todd Rovito.
5153
You can’t perform that action at this time.
0 commit comments