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.
This commit is contained in:
Guido van Rossum 1998-09-14 19:06:39 +00:00
parent 98b6246c0c
commit 0c92000b7a
1 changed files with 4 additions and 1 deletions

View File

@ -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)