Commit c3d9be0c authored by Martin Matějek's avatar Martin Matějek

Refactor plugin file loading from disk

Load only .yml files and skip on fail
parent 7cca923c
......@@ -30,13 +30,11 @@ class PluginStorage:
"""Load plugins from FS"""
for _, _, files in os.walk(self.plugin_dir):
for f in files:
if f.startswith('.'): # ignore dotfiles
if not f.startswith('.') and f.endswith('.yml'):
p = Plugin.from_file(self.plugin_file_path(f))
p = Plugin.from_file(self.plugin_file_path(f))
if p:
self.plugins[] = p
if p:
self.plugins[] = p
def get_plugin(self, name):
"""Return plugin specified by name"""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment