diff --git a/sat/core/xmpp.py b/sat/core/xmpp.py index 76b82b2e..eaa5a9d2 100644 --- a/sat/core/xmpp.py +++ b/sat/core/xmpp.py @@ -44,6 +44,7 @@ from sat.core import exceptions from sat.memory import encryption from sat.memory import persistent from sat.tools import xml_tools +from sat.tools import utils from sat.tools.common import data_format from zope.interface import implementer @@ -121,7 +122,7 @@ class SatXMPPEntity: # profile connecting is called right now (before actually starting client) connecting_cb = getattr(plugin, "profileConnecting", None) if connecting_cb is not None: - yield connecting_cb(self) + yield utils.asDeferred(connecting_cb, self) # profile connected is called after client is ready and roster is got connected_cb = getattr(plugin, "profileConnected", None) @@ -236,7 +237,7 @@ class SatXMPPEntity: # and print error message if any of them fails conn_cb_list = [] for __, callback in plugin_conn_cb: - conn_cb_list.append(defer.maybeDeferred(callback, entity)) + conn_cb_list.append(utils.asDeferred(callback, entity)) list_d = defer.DeferredList(conn_cb_list) def logPluginResults(results):