core (client): added a sendError method to easily build error response from <IQ\> stanza

This commit is contained in:
Goffi 2015-11-11 14:56:05 +01:00
commit f21c94b205

View file

@ -478,6 +478,7 @@ class SAT(service.Service):
def getJidNStream(self, profile_key):
"""Convenient method to get jid and stream from profile key
@return: tuple (jid, xmlstream) from profile, can be None"""
# TODO: deprecate this method (getClient is enough)
profile = self.memory.getProfileName(profile_key)
if not profile or not self.profiles[profile].isConnected():
return (None, None)