From: Georg Brandl Date: Wed, 12 Apr 2006 15:28:49 +0000 (+0000) Subject: Patch #1468808: don't complain if Tkinter is already deleted at the time Font.__del__... X-Git-Tag: v2.5a2~302 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=314fce92dd12a8ff82876bd18845a2249a931fae;p=python Patch #1468808: don't complain if Tkinter is already deleted at the time Font.__del__ is run. --- diff --git a/Lib/lib-tk/tkFont.py b/Lib/lib-tk/tkFont.py index 5b5a6ba36b..15dea2eba3 100644 --- a/Lib/lib-tk/tkFont.py +++ b/Lib/lib-tk/tkFont.py @@ -108,7 +108,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):