Index: channels/specbuttons.py ================================================================== --- channels/specbuttons.py +++ channels/specbuttons.py @@ -1,9 +1,9 @@ # encoding: utf-8 # title: Spec buttons for apps # description: Adds configurable mini toolbar buttons -# version: 0.8 +# version: 0.8.1 # depends: streamtuner2 >= 2.2.0 # type: feature # category: ui # config: # { name: specbutton_rows, value: 2, max: 4, type: int, description: "Number of rows to arrange buttons in." } @@ -95,12 +95,15 @@ else: wi.set_from_stock("gtk-image-missing", gtk.ICON_SIZE_SMALL_TOOLBAR) return wi # Look for image basename (e.g. "play") in /usr/share/icons/*.* and /pixmaps/* - def locate(self, btn): - f = subprocess.Popen(["locate", "/usr/share/[pi]*s/*%s*.*" % btn], stdout=subprocess.PIPE) + def locate(self, btn, f=None): + try: + f = subprocess.Popen(["locate", "/usr/share/[pi]*s/*%s*.*" % btn], stdout=subprocess.PIPE) + except: + return None path, err = f.communicate() if not err: return path.split("\n")[0] # Update paths when saving config dialog