From: Guido van Rossum Date: Fri, 10 Apr 1998 19:17:41 +0000 (+0000) Subject: Catch exceptions in final self.destroy() call. X-Git-Tag: v1.5.1~93 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd8341eeeb45b03effb2b511af699b635eb30a6c;p=thirdparty%2FPython%2Fcpython.git Catch exceptions in final self.destroy() call. --- diff --git a/Demo/tkinter/guido/electrons.py b/Demo/tkinter/guido/electrons.py index d7643804caab..f16c3fa531d5 100755 --- a/Demo/tkinter/guido/electrons.py +++ b/Demo/tkinter/guido/electrons.py @@ -55,8 +55,11 @@ class Electrons: try: while 1: self.random_move(self.n) - finally: - self.tk.destroy() + except TclError: + try: + self.tk.destroy() + except TclError: + pass # Main program