mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 04:39:26 +01:00
supybot-plugin-doc: Fix bugs with --plugins-dir
This commit is contained in:
parent
6b9de3d09d
commit
524e409322
@ -291,13 +291,15 @@ if __name__ == '__main__':
|
||||
pluginNames = set([os.path.basename(s) for s in args])
|
||||
plugins = set([])
|
||||
for pluginName in pluginNames:
|
||||
if pluginName == '__pycache__':
|
||||
continue
|
||||
if pluginName.endswith('.py'):
|
||||
pluginName = pluginName[:-3]
|
||||
try:
|
||||
pluginModule = plugin.loadPluginModule(pluginName)
|
||||
except ImportError as e:
|
||||
s = 'Failed to load plugin %s: %s\n' \
|
||||
'%s(pluginDirs: %s)' % (pluginName, e, s,
|
||||
'(pluginDirs: %s)' % (pluginName, e,
|
||||
conf.supybot.directories.plugins())
|
||||
error(s)
|
||||
plugins.add(pluginModule)
|
||||
|
Loading…
Reference in New Issue
Block a user