mirror of
https://github.com/python/cpython.git
synced 2025-07-22 18:55:22 +00:00
Catch exceptions in final self.destroy() call.
This commit is contained in:
parent
bd24eb447e
commit
bd8341eeeb
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue