# HG changeset patch # User Goffi # Date 1596290389 -7200 # Node ID 5369ce5bcecf512c549b0d28e78b20e976d1238d # Parent 53b229761c9d949dc8a987886d417e086244c86b core (xmpp): text can now be specified in `sendError` diff -r 53b229761c9d -r 5369ce5bcecf sat/core/xmpp.py --- a/sat/core/xmpp.py Sat Aug 01 15:58:20 2020 +0200 +++ b/sat/core/xmpp.py Sat Aug 01 15:59:49 2020 +0200 @@ -532,13 +532,13 @@ 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 @@ 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