massive (preventive) addition of 'u' (unicode) before the strings passed to logging functions
This commit is contained in:
parent
cc829beac7
commit
67ff77e5de
1 changed files with 272 additions and 271 deletions
|
|
@ -84,17 +84,17 @@ class XEP_0077(object):
|
|||
|
||||
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 @@ class XEP_0077(object):
|
|||
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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue