core (xmpp): text can now be specified in sendError
This commit is contained in:
parent
ef23eca7cd
commit
edd33a126d
1 changed files with 4 additions and 4 deletions
|
|
@ -532,13 +532,13 @@ class SatXMPPEntity:
|
|||
iq_elt.timeout = timeout
|
||||
return iq_elt
|
||||
|
||||
def sendError(self, iq_elt, condition):
|
||||
def sendError(self, iq_elt, condition, text=None):
|
||||
"""Send error stanza build from iq_elt
|
||||
|
||||
@param iq_elt(domish.Element): initial IQ element
|
||||
@param condition(unicode): error condition
|
||||
"""
|
||||
iq_error_elt = error.StanzaError(condition).toResponse(iq_elt)
|
||||
iq_error_elt = error.StanzaError(condition, text=text).toResponse(iq_elt)
|
||||
self.xmlstream.send(iq_error_elt)
|
||||
|
||||
def generateMessageXML(self, data, post_xml_treatments=None):
|
||||
|
|
@ -1466,8 +1466,8 @@ class SatRosterProtocol(xmppim.RosterClientProtocol):
|
|||
del self._groups[group]
|
||||
except KeyError:
|
||||
log.warning(
|
||||
"there is no cache for the group [{group}] of the removed roster "
|
||||
"item [{jid_}]".format(group=group, jid=entity)
|
||||
f"there is no cache for the group [{group}] of the removed roster "
|
||||
f"item [{entity}]"
|
||||
)
|
||||
|
||||
# then we send the bridge signal
|
||||
|
|
|
|||
Loading…
Reference in a new issue