diff --git a/lib/matplotlib/backend_tools.py b/lib/matplotlib/backend_tools.py index 1daba5e41789..b1f03b736103 100644 --- a/lib/matplotlib/backend_tools.py +++ b/lib/matplotlib/backend_tools.py @@ -327,7 +327,7 @@ class ToolQuit(ToolBase): def trigger(self, sender, event, data=None): try: manager = self.figure.canvas.manager - except: + except AttributeError: pass else: manager.destroy('window_destroy_event')