From: Guido van Rossum Date: Mon, 8 Feb 1999 22:27:49 +0000 (+0000) Subject: Don't crash if a window no longer exists. X-Git-Tag: v1.5.2b2~104 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec119a3fc94d126a5044041bada7d7c3edf03ec3;p=python Don't crash if a window no longer exists. --- diff --git a/Tools/idle/WindowList.py b/Tools/idle/WindowList.py index 537b31c12e..3a85c1939e 100644 --- a/Tools/idle/WindowList.py +++ b/Tools/idle/WindowList.py @@ -19,7 +19,10 @@ class WindowList: list = [] for key in self.dict.keys(): window = self.dict[key] - title = window.get_title() + try: + title = window.get_title() + except TclError: + continue list.append((title, window)) list.sort() for title, window in list: