Exemple #1
0
 def updateAllPluginInfo(self):
     """ Updates the info about plugins in the DB
         We must keep if plugins are active or not even between reloads
         and even if plugins are removed from the file system (they may
         be present again later)
     """
     for pt in self.getPluginTypes(includeNonPresent = True):
         pt.setPresent(False)
     
     types = Plugins.getTypeList()
     for type in types:
         
         if self.hasPluginType(type, mustBePresent = False, mustBeActive = False):
             pluginType = self.getPluginType(type)
             pluginType.setPresent(True)
         else:
             pluginType = PluginType(type) 
             self.add(pluginType)
         
         pluginType.updateInfo()
Exemple #2
0
    def updateAllPluginInfo(self):
        """ Updates the info about plugins in the DB
            We must keep if plugins are active or not even between reloads
            and even if plugins are removed from the file system (they may
            be present again later)
        """
        for pt in self.getPluginTypes(includeNonPresent=True):
            pt.setPresent(False)

        types = Plugins.getTypeList()
        for type in types:

            if self.hasPluginType(type,
                                  mustBePresent=False,
                                  mustBeActive=False):
                pluginType = self.getPluginType(type)
                pluginType.setPresent(True)
            else:
                pluginType = PluginType(type)
                self.add(pluginType)

            pluginType.updateInfo()