diff options
-rwxr-xr-x | logout-manager-tcl.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/logout-manager-tcl.py b/logout-manager-tcl.py index f774088..9d8f999 100755 --- a/logout-manager-tcl.py +++ b/logout-manager-tcl.py @@ -298,14 +298,14 @@ def get_scaled_icon(icon_name, size = 24, icon_theme = "default", fallback_icon_ else: photo = Image.open(iconfilename) photo.thumbnail(size=[size, size]) + try: + photo = ImageTk.PhotoImage(photo) + except Exception as e: + print("Error was ",e) except: print("Error with icon file.") return None # If I ever add HiDPI support, multiple size here by the factor. So, size * 1.25 - try: - photo = ImageTk.PhotoImage(photo) - except Exception as e: - print("Error was ",e) return photo class App: |