Fix warning trying to import the __init__.py file as a plugin

This commit is contained in:
Stephen Boddy 2015-11-28 18:58:47 +01:00
parent 9fde814a44
commit 0e2f170032

View File

@ -86,6 +86,8 @@ class PluginRegistry(borg.Borg):
sys.path.remove(plugindir)
continue
for plugin in files:
if plugin == '__init__.py':
continue
pluginpath = os.path.join(plugindir, plugin)
if os.path.isfile(pluginpath) and plugin[-3:] == '.py':
dbg('PluginRegistry::load_plugins: Importing plugin %s' %