aboutsummaryrefslogtreecommitdiff
path: root/logout-manager-tcl.py
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2019-06-20 11:30:01 -0400
committerB Stack <bgstack15@gmail.com>2019-06-20 11:30:01 -0400
commitd8a46b01f3df7366d2323be0e954d2af090870fd (patch)
tree73b22584c7b2cb2fc7bb733bb3d08efd144b58a1 /logout-manager-tcl.py
parentWIP: add initial svg support (diff)
downloadlogout-manager-d8a46b01f3df7366d2323be0e954d2af090870fd.tar.gz
logout-manager-d8a46b01f3df7366d2323be0e954d2af090870fd.tar.bz2
logout-manager-d8a46b01f3df7366d2323be0e954d2af090870fd.zip
WIP: rearrange the photoimage error check
Diffstat (limited to 'logout-manager-tcl.py')
-rwxr-xr-xlogout-manager-tcl.py8
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:
bgstack15