From 9b4c85cae35a121e83f2a605cebef30e61ad37a6 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Tue, 13 Mar 2018 13:40:25 +0200 Subject: [PATCH] refactor. --- pysollib/util.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pysollib/util.py b/pysollib/util.py index 1a8d505d..95a8384e 100644 --- a/pysollib/util.py +++ b/pysollib/util.py @@ -143,16 +143,10 @@ class DataLoader: raise OSError("DataLoader could not find image "+filename + " in "+self.dir+" "+str(subdirs)) - def findIcon(self, filename=None, subdirs=None): - if not filename: - # filename = PACKAGE.lower() - filename = 'pysol' + def findIcon(self, filename='pysol', subdirs=None): root, ext = os.path.splitext(filename) if not ext: - if os.name == 'nt': - filename = filename + ".ico" - else: - filename = filename + ".xbm" + filename += ('.ico' if os.name == 'nt' else '.xbm') return self.findFile(filename, subdirs) def findDir(self, filename, subdirs=None):