summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-02-08 22:27:49 (GMT)
committerGuido van Rossum <guido@python.org>1999-02-08 22:27:49 (GMT)
commitec119a3fc94d126a5044041bada7d7c3edf03ec3 (patch)
treec5f8e4c7372cf899a8812db573855dd509c8a741
parent5ec13c53181b77151a03fb2553eeaf7bbdcd8ad1 (diff)
downloadcpython-ec119a3fc94d126a5044041bada7d7c3edf03ec3.zip
cpython-ec119a3fc94d126a5044041bada7d7c3edf03ec3.tar.gz
cpython-ec119a3fc94d126a5044041bada7d7c3edf03ec3.tar.bz2
Don't crash if a window no longer exists.
-rw-r--r--Tools/idle/WindowList.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tools/idle/WindowList.py b/Tools/idle/WindowList.py
index 537b31c..3a85c19 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: