Skip to content

Commit 45a633d

Browse files
authored
Display a traceback of plugin loading errors when --debug is given (slgobinath#506)
1 parent 06d8f49 commit 45a633d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

safeeyes/plugin_manager.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ def init(self, context, config):
8585
try:
8686
self.__load_plugin(plugin)
8787
except BaseException as e:
88+
traceback_wanted = logging.getLogger().getEffectiveLevel() == logging.DEBUG
89+
if traceback_wanted:
90+
import traceback
91+
traceback.print_exc()
8892
logging.error('Error in loading the plugin %s: %s', plugin['id'], e)
8993
continue
9094
# Initialize the plugins

0 commit comments

Comments
 (0)