Exemple #1
0
    def __init__(self, default_preference=[]):
        self.plugins = dict()

        self.all_names = [x.name for x in IPlugin.__subclasses__()]

        self.changed = True
        self._force_backend = None
        self.preference = []
        self.default_preference = default_preference
        self._backend = None
Exemple #2
0
    def __init__(self, default_preference=[]):
        self.plugins = dict()

        self.all_names = [x.name for x in IPlugin.__subclasses__()]

        self.changed = True
        self._force_backend = None
        self.preference = []
        self.default_preference = default_preference
        self._backend = None
Exemple #3
0
 def get_valid_plugin_by_name(self, name):
     if name not in self.plugins:
         ls = filter(lambda x: x.name == name, IPlugin.__subclasses__())
         if len(ls):
             try:
                 plugin = ls[0]()
             except Exception:
                 plugin = None
         else:
             plugin = None
         self.plugins[name] = plugin
     return self.plugins[name]
Exemple #4
0
 def get_valid_plugin_by_name(self, name):
     if name not in self.plugins:
         ls = filter(lambda x: x.name == name, IPlugin.__subclasses__())
         if len(ls):
             try:
                 plugin = ls[0]()
             except Exception:
                 plugin = None
         else:
             plugin = None
         self.plugins[name] = plugin
     return self.plugins[name]
Exemple #5
0
 def plugin_classes(self):
     return IPlugin.__subclasses__()
Exemple #6
0
 def plugin_classes(self):
     return IPlugin.__subclasses__()