supybot-test: Display a full traceback when there is an error while importing a plugin.

This commit is contained in:
Valentin Lorentz 2013-10-27 11:53:36 +01:00
parent 4aa34ba6d8
commit 15872a2e6a

View File

@ -38,6 +38,7 @@ started = time.time()
import supybot
import logging
import traceback
# We need to do this before we import conf.
if not os.path.exists('test-conf'):
@ -198,7 +199,8 @@ if __name__ == '__main__':
try:
pluginModule = plugin.loadPluginModule(pluginName)
except (ImportError, callbacks.Error) as e:
sys.stderr.write('Failed to load plugin %s: %s\n' % (pluginName,e))
sys.stderr.write('Failed to load plugin %s:' % pluginName)
traceback.print_exc()
sys.stderr.write('(pluginDirs: %s)\n' %
conf.supybot.directories.plugins())
continue