Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7d6f355

Browse files
authored
Merge pull request #17720 from anntzer/managernone
Fix check for manager = None.
2 parents e9db06a + 50f4da5 commit 7d6f355

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2233,15 +2233,15 @@ def get_window_title(self):
22332233
Return the title text of the window containing the figure, or None
22342234
if there is no window (e.g., a PS backend).
22352235
"""
2236-
if self.manager:
2236+
if self.manager is not None:
22372237
return self.manager.get_window_title()
22382238

22392239
def set_window_title(self, title):
22402240
"""
22412241
Set the title text of the window containing the figure. Note that
22422242
this has no effect if there is no window (e.g., a PS backend).
22432243
"""
2244-
if hasattr(self, "manager"):
2244+
if self.manager is not None:
22452245
self.manager.set_window_title(title)
22462246

22472247
def get_default_filename(self):

0 commit comments

Comments
 (0)