From 227b15245a94c2e1c990863f6625a13a7d54c616 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Mon, 30 May 2005 19:20:36 +0000 Subject: [PATCH] Some plugins raise callbacks.Error rather than ImportError when they can't be imported (usually due to a dependency on sqlite or similar). --- scripts/supybot-test | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/supybot-test b/scripts/supybot-test index 3859231cb..b0eae82a0 100644 --- a/scripts/supybot-test +++ b/scripts/supybot-test @@ -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())