Mercurial > libervia-backend
diff src/plugins/plugin_xep_0077.py @ 1409:3265a2639182
massive (preventive) addition of 'u' (unicode) before the strings passed to logging functions
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 16 Apr 2015 14:57:57 +0200 |
parents | 069ad98b360d |
children | d17772b0fe22 |
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0077.py Thu Apr 16 13:31:14 2015 +0200 +++ b/src/plugins/plugin_xep_0077.py Thu Apr 16 14:57:57 2015 +0200 @@ -84,17 +84,17 @@ def _regErr(self, failure, client): """Called when something is wrong with registration""" - log.info(_("Registration failure: %s") % str(failure.value)) + log.info(_("Registration failure: %s") % unicode(failure.value)) raise failure def _regSuccess(self, answer, client, post_treat_cb): - log.debug(_("registration answer: %s") % answer.toXml()) + log.debug(_(u"registration answer: %s") % answer.toXml()) if post_treat_cb is not None: post_treat_cb(jid.JID(answer['from']), client.profile) return {} def _regFailure(self, failure, client): - log.info(_("Registration failure: %s") % str(failure.value)) + log.info(_(u"Registration failure: %s") % unicode(failure.value)) if failure.value.condition == 'conflict': raise exceptions.ConflictError( _("Username already exists, please choose an other one")) raise failure @@ -105,7 +105,7 @@ def inBandRegister(self, to_jid, post_treat_cb=None, profile_key=C.PROF_KEY_NONE): """register to a target JID""" client = self.host.getClient(profile_key) - log.debug(_("Asking registration for [%s]") % to_jid.full()) + log.debug(_(u"Asking registration for [%s]") % to_jid.full()) reg_request = IQ(client.xmlstream, 'get') reg_request["from"] = client.jid.full() reg_request["to"] = to_jid.full()