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):
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: