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
1 changed files with 2 additions and 0 deletions

View File

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