From d58c7464d96e212c2d0b458b9509a328a68f1961 Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Tue, 22 Jun 1999 18:37:35 +0000 Subject: mod from Joe Strout: when quitting, catch errors in window.close() methods and ignore them. Otherwise one can never quit. --- Mac/Tools/IDE/PythonIDEMain.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Mac/Tools/IDE/PythonIDEMain.py b/Mac/Tools/IDE/PythonIDEMain.py index b869359..ae5f0e3 100644 --- a/Mac/Tools/IDE/PythonIDEMain.py +++ b/Mac/Tools/IDE/PythonIDEMain.py @@ -228,7 +228,10 @@ class PythonIDE(Wapplication.Application): PyConsole.output.writeprefs() PyEdit.searchengine.writeprefs() 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: return self.quitting = 1 -- cgit v0.12