Skip to content

Commit

Permalink
Catch exceptions in final self.destroy() call.
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed Apr 10, 1998
1 parent bd24eb4 commit bd8341e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Demo/tkinter/guido/electrons.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ def run(self):
try:
while 1:
self.random_move(self.n)
finally:
self.tk.destroy()
except TclError:
try:
self.tk.destroy()
except TclError:
pass


# Main program
Expand Down

0 comments on commit bd8341e

Please sign in to comment.