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