From 032760e1182be393c52b27b8ee90bd3db05f11d3 Mon Sep 17 00:00:00 2001 From: alfrix Date: Tue, 30 Apr 2024 07:26:12 -0300 Subject: [PATCH] kgtk: do not log if printer icon missing --- ks_includes/KlippyGtk.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ks_includes/KlippyGtk.py b/ks_includes/KlippyGtk.py index ced8f081..5487aa95 100644 --- a/ks_includes/KlippyGtk.py +++ b/ks_includes/KlippyGtk.py @@ -122,7 +122,8 @@ class KlippyGtk: height = height if height is not None else self.img_height filename = os.path.join(self.themedir, filename) 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: return pixbuf return None