示例#1
0
    def load(self):
        if os.path.exists(self.path):
            self.data = yaml.load(open(self.path))
        else:
            self.data = {}

        for plugin in Plugin.all(self.context):
            plugin.add_config_defaults(self)
示例#2
0
文件: config.py 项目: ajenti/veb
    def load(self):
        if os.path.exists(self.path):
            self.data = yaml.load(open(self.path))
        else:
            self.data = {}

        for plugin in Plugin.all(self.context):
            plugin.add_config_defaults(self)
示例#3
0
 def run(self):
     plugins = sorted(Plugin.classes(), key=lambda x: x.name)
     for plugin in plugins:
         print plugin.name