# HG changeset patch # User Goffi # Date 1576841284 -3600 # Node ID 13be04a70e2f96d32fdb9967a11563dbbe95980a # Parent c048fc192739707edbc4812f65e52da724752b9e plugin XEP-0045: show join error even if it's not a StanzaError, log it with warning instead of error diff -r c048fc192739 -r 13be04a70e2f sat/plugins/plugin_xep_0045.py --- a/sat/plugins/plugin_xep_0045.py Fri Dec 20 12:28:01 2019 +0100 +++ b/sat/plugins/plugin_xep_0045.py Fri Dec 20 12:28:04 2019 +0100 @@ -280,12 +280,12 @@ msg=_('Error while configuring the room: {failure_}')) return room.fully_joined - def _joinEb(self, failure, client, room_jid, nick, password): + def _joinEb(self, failure_, client, room_jid, nick, password): """Called when something is going wrong when joining the room""" try: - condition = failure.value.condition + condition = failure_.value.condition except AttributeError: - msg_suffix = '' + msg_suffix = f': {failure_}' else: if condition == 'conflict': # we have a nickname conflict, we try again with "_" suffixed to current nickname @@ -300,11 +300,11 @@ d.addCallback(self._passwordUICb, client, room_jid, nick) return d - msg_suffix = ' with condition "{}"'.format(failure.value.condition) + msg_suffix = ' with condition "{}"'.format(failure_.value.condition) mess = D_("Error while joining the room {room}{suffix}".format( room = room_jid.userhost(), suffix = msg_suffix)) - log.error(mess) + log.warning(mess) xmlui = xml_tools.note(mess, D_("Group chat error"), level=C.XMLUI_DATA_LVL_ERROR) self.host.actionNew({'xmlui': xmlui.toXml()}, profile=client.profile)