diff sat/core/sat_main.py @ 4019:7bf7677b893d

core: log a traceback if a plugin can't be loaded
author Goffi <goffi@goffi.org>
date Thu, 23 Mar 2023 15:24:10 +0100
parents f5ba7594cced
children 524856bd7b19
line wrap: on
line diff
--- a/sat/core/sat_main.py	Mon Mar 20 12:01:13 2023 +0100
+++ b/sat/core/sat_main.py	Thu Mar 23 15:24:10 2023 +0100
@@ -432,10 +432,8 @@
         try:
             self.plugins[import_name] = getattr(mod, plugin_info["main"])(self)
         except Exception as e:
-            log.warning(
-                'Error while loading plugin "{name}", ignoring it: {error}'.format(
-                    name=plugin_info["name"], error=e
-                )
+            log.exception(
+                f"Can't load plugin \"{plugin_info['name']}\", ignoring it: {e}"
             )
             if optional:
                 return