diff options
author | Guido van Rossum <guido@python.org> | 1998-09-14 19:06:39 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-09-14 19:06:39 (GMT) |
commit | 0c92000b7a679f1c8add378bb36c6c08efe6f6eb (patch) | |
tree | 6e9395a6b75bfa99e4f0a4e9cc6b56c1447c7893 /Lib/lib-tk/Tkinter.py | |
parent | 98b6246c0c60f2831b0c7a66d8c0659ebac1ec32 (diff) | |
download | cpython-0c92000b7a679f1c8add378bb36c6c08efe6f6eb.zip cpython-0c92000b7a679f1c8add378bb36c6c08efe6f6eb.tar.gz cpython-0c92000b7a679f1c8add378bb36c6c08efe6f6eb.tar.bz2 |
Ignore the TclError exception raised when deleting the registration
for callit, used by the after() command. This can happen when the
callback deletes the window.
Diffstat (limited to 'Lib/lib-tk/Tkinter.py')
-rw-r--r-- | Lib/lib-tk/Tkinter.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 4bcb632..ae6cfb5 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -221,7 +221,10 @@ class Misc: try: apply(func, args) finally: - self.deletecommand(tmp[0]) + try: + self.deletecommand(tmp[0]) + except TclError: + pass name = self._register(callit) tmp.append(name) return self.tk.call('after', ms, name) |