kgtk: do not log if printer icon missing
This commit is contained in:
parent
81560ca006
commit
032760e118
@ -122,7 +122,8 @@ class KlippyGtk:
|
|||||||
height = height if height is not None else self.img_height
|
height = height if height is not None else self.img_height
|
||||||
filename = os.path.join(self.themedir, filename)
|
filename = os.path.join(self.themedir, filename)
|
||||||
for ext in ["svg", "png"]:
|
for ext in ["svg", "png"]:
|
||||||
pixbuf = self.PixbufFromFile(f"{filename}.{ext}", int(width), int(height))
|
file = f"{filename}.{ext}"
|
||||||
|
pixbuf = self.PixbufFromFile(file, int(width), int(height)) if os.path.exists(file) else None
|
||||||
if pixbuf is not None:
|
if pixbuf is not None:
|
||||||
return pixbuf
|
return pixbuf
|
||||||
return None
|
return None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user