🌐 AI搜索 & 代理 主页
Skip to content

Commit 3766290

Browse files
authored
Merge pull request #17724 from meeseeksmachine/auto-backport-of-pr-17720-on-v3.3.x
Backport PR #17720 on branch v3.3.x (Fix check for manager = None.)
2 parents fdaee63 + 6aaa675 commit 3766290

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)