Catch exceptions in final self.destroy() call.

This commit is contained in:
Guido van Rossum 1998-04-10 19:17:41 +00:00
parent bd24eb447e
commit bd8341eeeb

View file

@ -55,8 +55,11 @@ class Electrons:
try:
while 1:
self.random_move(self.n)
finally:
except TclError:
try:
self.tk.destroy()
except TclError:
pass
# Main program