mirror of
https://github.com/python/cpython.git
synced 2025-10-28 12:15:13 +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 @@ def run(self):
|
||||||
try:
|
try:
|
||||||
while 1:
|
while 1:
|
||||||
self.random_move(self.n)
|
self.random_move(self.n)
|
||||||
finally:
|
except TclError:
|
||||||
self.tk.destroy()
|
try:
|
||||||
|
self.tk.destroy()
|
||||||
|
except TclError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
# Main program
|
# Main program
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue