add missing __init__.py
[enigma2.git] / lib / python / Components / PluginComponent.py
index 0b4070218b5462a65a3fb06e633c04d1f81f4aea..67373ea7af033a3ec95df33db35a6e54650d47f5 100644 (file)
@@ -20,21 +20,24 @@ class PluginComponent:
 
                for x in dir:
                        path = resolveFilename(SCOPE_PLUGINS, x) + "/"
-                       if os.path.exists(path):
-                               if fileExists(path + "plugin.py"):
-                                       pluginmodule = self.prefix + x + ".plugin"
-                                       print "trying to import " + pluginmodule
-                                       exec "import " + pluginmodule
-                                       plugin = eval(pluginmodule)
-                                       picturepath = plugin.getPicturePath()
-                                       pluginname = plugin.getPluginName()
-                                       try:
-                                               for menuEntry in plugin.getMenuRegistrationList():
-                                                       self.menuEntries.append([menuEntry, pluginmodule])
-                                       except:
-                                               pass
-       
-                                       list.append((picturepath, pluginname , x))
+                       try:
+                               if os.path.exists(path):
+                                       if fileExists(path + "plugin.py"):
+                                               pluginmodule = self.prefix + x + ".plugin"
+                                               print "trying to import " + pluginmodule
+                                               exec "import " + pluginmodule
+                                               plugin = eval(pluginmodule)
+                                               picturepath = plugin.getPicturePath()
+                                               pluginname = plugin.getPluginName()
+                                               try:
+                                                       for menuEntry in plugin.getMenuRegistrationList():
+                                                               self.menuEntries.append([menuEntry, pluginmodule])
+                                               except:
+                                                       pass
+               
+                                               list.append((picturepath, pluginname , x))
+                       except:
+                               print "Directory", path, "contains a faulty plugin"
                self.menuUpdate()
                return list