From 50f4da5046eabaa7110f30935fec3b91b76e4b3c Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Mon, 22 Jun 2020 20:17:12 +0200 Subject: [PATCH] Fix check for manager = None. The previous check was for `hasattr(canvas, "manager")` but canvases now always have the attribute present. Missed this in 3ccc17b. --- lib/matplotlib/backend_bases.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/backend_bases.py b/lib/matplotlib/backend_bases.py index 37d7d276ea93..5bdcb6c6a64f 100644 --- a/lib/matplotlib/backend_bases.py +++ b/lib/matplotlib/backend_bases.py @@ -2233,7 +2233,7 @@ def get_window_title(self): Return the title text of the window containing the figure, or None if there is no window (e.g., a PS backend). """ - if self.manager: + if self.manager is not None: return self.manager.get_window_title() def set_window_title(self, title): @@ -2241,7 +2241,7 @@ def set_window_title(self, title): Set the title text of the window containing the figure. Note that this has no effect if there is no window (e.g., a PS backend). """ - if hasattr(self, "manager"): + if self.manager is not None: self.manager.set_window_title(title) def get_default_filename(self): pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy