mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
supybot-test: Display a full traceback when there is an error while importing a plugin.
This commit is contained in:
parent
4aa34ba6d8
commit
15872a2e6a
@ -38,6 +38,7 @@ started = time.time()
|
|||||||
|
|
||||||
import supybot
|
import supybot
|
||||||
import logging
|
import logging
|
||||||
|
import traceback
|
||||||
|
|
||||||
# We need to do this before we import conf.
|
# We need to do this before we import conf.
|
||||||
if not os.path.exists('test-conf'):
|
if not os.path.exists('test-conf'):
|
||||||
@ -198,7 +199,8 @@ if __name__ == '__main__':
|
|||||||
try:
|
try:
|
||||||
pluginModule = plugin.loadPluginModule(pluginName)
|
pluginModule = plugin.loadPluginModule(pluginName)
|
||||||
except (ImportError, callbacks.Error) as e:
|
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' %
|
sys.stderr.write('(pluginDirs: %s)\n' %
|
||||||
conf.supybot.directories.plugins())
|
conf.supybot.directories.plugins())
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user