diff libervia/backend/core/main.py @ 4333:e94799a0908f

core (main): Let plugins have several handlers + various improvements: `get_handler` can now return several handlers, which is notably useful for component with several included services. Various improvements such move to `async` method, docstring/type hints update, and slight improvment of SatXMPPComponent. rel 453
author Goffi <goffi@goffi.org>
date Tue, 03 Dec 2024 00:11:00 +0100
parents 94e0968987cd
children
line wrap: on
line diff
--- a/libervia/backend/core/main.py	Sat Jul 13 18:28:28 2024 +0200
+++ b/libervia/backend/core/main.py	Tue Dec 03 00:11:00 2024 +0100
@@ -516,9 +516,9 @@
                 return
             raise ImportError("Error during initiation")
         if C.bool(plugin_info.get(C.PI_HANDLER, C.BOOL_FALSE)):
-            self.plugins[import_name].is_handler = True
+            self.plugins[import_name].has_handlers = True
         else:
-            self.plugins[import_name].is_handler = False
+            self.plugins[import_name].has_handlers = False
         # we keep metadata as a Class attribute
         self.plugins[import_name]._info = plugin_info
         # TODO: test xmppclient presence and register handler parent