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:
Jeremy Fincher 2005-05-30 19:20:36 +00:00
parent c1dcb47e3f
commit 227b15245a

View File

@ -77,6 +77,7 @@ import unittest
import supybot.utils as utils
import supybot.world as world
import supybot.callbacks as callbacks
world.startedAt = started
import logging
@ -182,7 +183,7 @@ if __name__ == '__main__':
pluginName = pluginName[:-3]
try:
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('(pluginDirs: %s)' %
conf.supybot.directories.plugins())