mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
Some plugins raise callbacks.Error rather than ImportError when they can't be imported (usually due to a dependency on sqlite or similar).
This commit is contained in:
parent
c1dcb47e3f
commit
227b15245a
@ -77,6 +77,7 @@ import unittest
|
|||||||
|
|
||||||
import supybot.utils as utils
|
import supybot.utils as utils
|
||||||
import supybot.world as world
|
import supybot.world as world
|
||||||
|
import supybot.callbacks as callbacks
|
||||||
world.startedAt = started
|
world.startedAt = started
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
@ -182,7 +183,7 @@ if __name__ == '__main__':
|
|||||||
pluginName = pluginName[:-3]
|
pluginName = pluginName[:-3]
|
||||||
try:
|
try:
|
||||||
pluginModule = plugin.loadPluginModule(pluginName)
|
pluginModule = plugin.loadPluginModule(pluginName)
|
||||||
except ImportError, e:
|
except (ImportError, callbacks.Error), e:
|
||||||
sys.stderr.write('Failed to load plugin %s: %s\n' % (pluginName,e))
|
sys.stderr.write('Failed to load plugin %s: %s\n' % (pluginName,e))
|
||||||
sys.stderr.write('(pluginDirs: %s)' %
|
sys.stderr.write('(pluginDirs: %s)' %
|
||||||
conf.supybot.directories.plugins())
|
conf.supybot.directories.plugins())
|
||||||
|
Loading…
Reference in New Issue
Block a user