[3.12] gh-128014: Fix passing default='' to the tkinter method wm_iconbitmap() (GH-128015) (GH-128420)

(cherry picked from commit 58e9f95c4a)

Co-authored-by: Zhikang Yan <2951256653@qq.com>
This commit is contained in:
Serhiy Storchaka 2025-01-02 18:21:00 +02:00 committed by GitHub
parent 52c08ed029
commit 7ce09fc93b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 33 additions and 2 deletions

View file

@ -2150,7 +2150,7 @@ class Wm:
explicitly. DEFAULT can be the relative path to a .ico file
(example: root.iconbitmap(default='myicon.ico') ). See Tk
documentation for more information."""
if default:
if default is not None:
return self.tk.call('wm', 'iconbitmap', self._w, '-default', default)
else:
return self.tk.call('wm', 'iconbitmap', self._w, bitmap)