File 0001-fix-path-find.patch of Package mate-menu.openSUSE_Leap_42.1_Update

diff -paur a/lib/mate-menu.py b/lib/mate-menu.py
--- a/lib/mate-menu.py	2016-01-18 16:59:19.000000000 +0300
+++ b/lib/mate-menu.py	2016-01-19 12:52:23.395199920 +0300
@@ -73,19 +73,6 @@ xdg.Config.setWindowManager('MATE')
 
 from mate_menu.execute import *
 
-def find_on_path(self, command):
-    """Is command on the executable search path?"""
-    if 'PATH' not in os.environ:
-        return False
-    path = os.environ['PATH']
-    for element in path.split(os.pathsep):
-        if not element:
-            continue
-        filename = os.path.join(element, command)
-        if os.path.isfile(filename) and os.access(filename, os.X_OK):
-            return True
-    return False
-
 class MainWindow( object ):
     """This is the main class for the application"""
 
@@ -576,12 +563,14 @@ class MenuWin( object ):
     def createPanelButton( self ):
         self.button_icon = Gtk.Image.new_from_file( self.buttonIcon )
         self.systemlabel = Gtk.Label(label= "%s " % self.buttonText )
-        if find_on_path('lsb_release'):
+        try:
             process = subprocess.Popen(['lsb_release', '-d'], stdout=subprocess.PIPE)
             out, err = process.communicate()
             tooltip = out.replace('Description:', '').strip()
             self.systemlabel.set_tooltip_text(tooltip)
             self.button_icon.set_tooltip_text(tooltip)
+        except FileNotFoundError:
+            pass
 
         if self.applet.get_orient() == MatePanelApplet.AppletOrient.UP or self.applet.get_orient() == MatePanelApplet.AppletOrient.DOWN:
             self.button_box = Gtk.HBox()
openSUSE Build Service is sponsored by