From: Georg Brandl Date: Wed, 12 Apr 2006 15:28:52 +0000 (+0000) Subject: Patch #1468808: don't complain if Tkinter is already deleted at the time Font.__del__... X-Git-Tag: v2.4.4c1~270 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17cfe2b7571ecfb2941e9857e725eef74119e9bf;p=thirdparty%2FPython%2Fcpython.git Patch #1468808: don't complain if Tkinter is already deleted at the time Font.__del__ is run. (backport from rev. 45310) --- diff --git a/Lib/lib-tk/tkFont.py b/Lib/lib-tk/tkFont.py index afbc18917dbc..c0e7da0f9b8e 100644 --- a/Lib/lib-tk/tkFont.py +++ b/Lib/lib-tk/tkFont.py @@ -117,7 +117,9 @@ class Font: try: if self.delete_font: self._call("font", "delete", self.name) - except (AttributeError, Tkinter.TclError): + except (KeyboardInterrupt, SystemExit): + raise + except Exception: pass def copy(self):