From 15872a2e6a6df767f03437d1433dcf976e2f4127 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 27 Oct 2013 11:53:36 +0100 Subject: [PATCH] supybot-test: Display a full traceback when there is an error while importing a plugin. --- scripts/supybot-test | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/supybot-test b/scripts/supybot-test index ee86dad09..30f3a30bb 100644 --- a/scripts/supybot-test +++ b/scripts/supybot-test @@ -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