comparison src/core/sat_main.py @ 1573:6338677f3a89

core (client): added a sendError method to easily build error response from <IQ\> stanza
author Goffi <goffi@goffi.org>
date Wed, 11 Nov 2015 14:56:05 +0100
parents 465d4d484e7c
children 846a39900fa6
comparison
equal deleted inserted replaced
1572:6a6fe840c3a6 1573:6338677f3a89
476 ## Misc methods ## 476 ## Misc methods ##
477 477
478 def getJidNStream(self, profile_key): 478 def getJidNStream(self, profile_key):
479 """Convenient method to get jid and stream from profile key 479 """Convenient method to get jid and stream from profile key
480 @return: tuple (jid, xmlstream) from profile, can be None""" 480 @return: tuple (jid, xmlstream) from profile, can be None"""
481 # TODO: deprecate this method (getClient is enough)
481 profile = self.memory.getProfileName(profile_key) 482 profile = self.memory.getProfileName(profile_key)
482 if not profile or not self.profiles[profile].isConnected(): 483 if not profile or not self.profiles[profile].isConnected():
483 return (None, None) 484 return (None, None)
484 return (self.profiles[profile].jid, self.profiles[profile].xmlstream) 485 return (self.profiles[profile].jid, self.profiles[profile].xmlstream)
485 486