Mercurial > libervia-backend
comparison libervia/backend/core/xmpp.py @ 4182:4dc00e848961
core (tools/trigger): new `add_with_check` method:
this method add a wrapper which will skip the trigger is the plugin is not available in
the session (e.g. a component which doesn't use the plugin).
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 09 Dec 2023 19:19:26 +0100 |
parents | d67eaa684484 |
children | 314d3c02bb67 |
comparison
equal
deleted
inserted
replaced
4181:bc898879af34 | 4182:4dc00e848961 |
---|---|
137 @return (list[object, callable]): plugin to trigger tuples with: | 137 @return (list[object, callable]): plugin to trigger tuples with: |
138 - plugin instance | 138 - plugin instance |
139 - profile_connected* triggers (to call after connection) | 139 - profile_connected* triggers (to call after connection) |
140 """ | 140 """ |
141 plugin_conn_cb = [] | 141 plugin_conn_cb = [] |
142 for plugin in self._get_plugins_list(): | 142 self.plugins = plugins = self._get_plugins_list() |
143 for plugin in plugins: | |
143 # we check if plugin handle client mode | 144 # we check if plugin handle client mode |
144 if plugin.is_handler: | 145 if plugin.is_handler: |
145 plugin.get_handler(self).setHandlerParent(self) | 146 plugin.get_handler(self).setHandlerParent(self) |
146 | 147 |
147 # profile_connecting/profile_connected methods handling | 148 # profile_connecting/profile_connected methods handling |