diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2020-01-24 23:36:22 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2020-01-24 23:36:22 +0000 |
commit | a4848eb7419f14699f30bc91c7b7f47babc2d088 (patch) | |
tree | c989280c15d23415abd5c6b2ba510ff8425bb75d | |
parent | 121e9d926fa50c8ecc9245f446ef4f2145012cf8 (diff) | |
download | fetchmail-a4848eb7419f14699f30bc91c7b7f47babc2d088.tar.gz fetchmail-a4848eb7419f14699f30bc91c7b7f47babc2d088.tar.bz2 fetchmail-a4848eb7419f14699f30bc91c7b7f47babc2d088.zip |
fetchmailconf: Heed Exceptions in make_icon_window().
-rwxr-xr-x | fetchmailconf.py | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/fetchmailconf.py b/fetchmailconf.py index c6885567..fef36fc5 100755 --- a/fetchmailconf.py +++ b/fetchmailconf.py @@ -552,18 +552,14 @@ def helpwin(helpdict): textframe.pack(side=TOP) def make_icon_window(base, image): - try: - # Some older pythons will error out on this - icon_image = PhotoImage(data=image) - icon_window = Toplevel() - Label(icon_window, image=icon_image, bg='black').pack() - base.master.iconwindow(icon_window) - # Avoid TkInter brain death. PhotoImage objects go out of - # scope when the enclosing function returns. Therefore - # we have to explicitly link them to something. - base.keepalive.append(icon_image) - except Exception: - pass + icon_image = PhotoImage(data=image) + icon_window = Toplevel() + Label(icon_window, image=icon_image, bg='black').pack() + base.master.iconwindow(icon_window) + # Avoid TkInter brain death. PhotoImage objects go out of + # scope when the enclosing function returns. Therefore + # we have to explicitly link them to something. + base.keepalive.append(icon_image) class ListEdit(Frame): # edit a list of values (duplicates not allowed) with a supplied editor hook |