From: Guido van Rossum Date: Mon, 14 Sep 1998 19:06:39 +0000 (+0000) Subject: Ignore the TclError exception raised when deleting the registration X-Git-Tag: v1.5.2a2~280 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0c92000b7a679f1c8add378bb36c6c08efe6f6eb;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 4bcb63295c7d..ae6cfb568aab 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)