changeset 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 86efd854dee1
children d8a1219e913f
files sat/core/sat_main.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
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