comparison src/plugins/plugin_xep_0033.py @ 844:f3513c8cc2e6

misc: fix unnamed arguments in format strings
author souliane <souliane@mailoo.org>
date Mon, 17 Feb 2014 14:58:26 +0100
parents 1fe00f0c9a91
children c897c8d321b3
comparison
equal deleted inserted replaced
843:efd92a645220 844:f3513c8cc2e6
85 85
86 def discoCallback(entity): 86 def discoCallback(entity):
87 if entity is None: 87 if entity is None:
88 return Failure(AbortSendMessage(_("XEP-0033 is being used but the server doesn't support it!"))) 88 return Failure(AbortSendMessage(_("XEP-0033 is being used but the server doesn't support it!")))
89 if mess_data["to"] != entity: 89 if mess_data["to"] != entity:
90 logging.warning(_("Stanzas using XEP-0033 should be addressed to %s, not %s!") % (entity, mess_data["to"])) 90 logging.warning(_("Stanzas using XEP-0033 should be addressed to %(expected)s, not %(current)s!") % {'expected': entity, 'current': mess_data["to"]})
91 logging.warning(_("TODO: addressing has be fixed by the backend... fix it in the frontend!")) 91 logging.warning(_("TODO: addressing has be fixed by the backend... fix it in the frontend!"))
92 mess_data["to"] = entity 92 mess_data["to"] = entity
93 element = mess_data['xml'].addElement('addresses', NS_ADDRESS) 93 element = mess_data['xml'].addElement('addresses', NS_ADDRESS)
94 entries = [entry.split(':') for entry in mess_data['extra']['address'].split('\n') if entry != ''] 94 entries = [entry.split(':') for entry in mess_data['extra']['address'].split('\n') if entry != '']
95 for type_, jid_ in entries: 95 for type_, jid_ in entries: