Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d58c746

Browse files
author
Just van Rossum
committed
mod from Joe Strout: when quitting, catch errors in window.close() methods and ignore them. Otherwise one can never quit.
1 parent 8746082 commit d58c746

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Mac/Tools/IDE/PythonIDEMain.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,10 @@ def _quit(self):
228228
PyConsole.output.writeprefs()
229229
PyEdit.searchengine.writeprefs()
230230
for window in self._windows.values():
231-
rv = window.close()
231+
try:
232+
rv = window.close() # ignore any errors while quitting
233+
except:
234+
rv = 0 # (otherwise, we can get stuck!)
232235
if rv and rv > 0:
233236
return
234237
self.quitting = 1

0 commit comments

Comments
 (0)