Skip to content

Commit 18f07ce

Browse files
committed
fix: Fix the bug that the parameter default of tkinter.Wm.iconbitmap could not take effect when passing an empty string
1 parent cfeaa99 commit 18f07ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/tkinter/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2265,7 +2265,7 @@ def wm_iconbitmap(self, bitmap=None, default=None):
22652265
explicitly. DEFAULT can be the relative path to a .ico file
22662266
(example: root.iconbitmap(default='myicon.ico') ). See Tk
22672267
documentation for more information."""
2268-
if default:
2268+
if default is not None:
22692269
return self.tk.call('wm', 'iconbitmap', self._w, '-default', default)
22702270
else:
22712271
return self.tk.call('wm', 'iconbitmap', self._w, bitmap)

0 commit comments

Comments
 (0)