mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
mod from Joe Strout: when quitting, catch errors in window.close() methods and ignore them. Otherwise one can never quit.
This commit is contained in:
parent
8746082175
commit
d58c7464d9
1 changed files with 4 additions and 1 deletions
|
|
@ -228,7 +228,10 @@ def _quit(self):
|
||||||
PyConsole.output.writeprefs()
|
PyConsole.output.writeprefs()
|
||||||
PyEdit.searchengine.writeprefs()
|
PyEdit.searchengine.writeprefs()
|
||||||
for window in self._windows.values():
|
for window in self._windows.values():
|
||||||
rv = window.close()
|
try:
|
||||||
|
rv = window.close() # ignore any errors while quitting
|
||||||
|
except:
|
||||||
|
rv = 0 # (otherwise, we can get stuck!)
|
||||||
if rv and rv > 0:
|
if rv and rv > 0:
|
||||||
return
|
return
|
||||||
self.quitting = 1
|
self.quitting = 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue