massive (preventive) addition of 'u' (unicode) before the strings passed to logging functions

This commit is contained in:
souliane 2015-04-16 14:57:57 +02:00
commit 67ff77e5de

View file

@ -131,9 +131,9 @@ class Discovery(object):
# we cache items only for our own server
try:
items = self.host.memory.getEntityData(jid_, ["DISCO_ITEMS"], client.profile)["DISCO_ITEMS"]
log.debug("[%s] disco items are in cache" % jid_.full())
log.debug(u"[%s] disco items are in cache" % jid_.full())
except (KeyError, exceptions.UnknownEntityError):
log.debug("Caching [%s] disco items" % jid_.full())
log.debug(u"Caching [%s] disco items" % jid_.full())
items = yield client.disco.requestItems(jid_, nodeIdentifier)
self.host.memory.updateEntityData(jid_, "DISCO_ITEMS", items, profile_key=client.profile)
else:
@ -144,7 +144,7 @@ class Discovery(object):
def _infosEb(self, failure, entity_jid):
failure.trap(StanzaError)
log.warning(_("Error while requesting [%(jid)s]: %(error)s") % {'jid': entity_jid.full(),
log.warning(_(u"Error while requesting [%(jid)s]: %(error)s") % {'jid': entity_jid.full(),
'error': failure.getErrorMessage()})
def findServiceEntities(self, category, type_, jid_=None, profile_key=C.PROF_KEY_NONE):
@ -243,7 +243,7 @@ class Discovery(object):
s.append('<')
#TODO: manage XEP-0128 data form here
cap_hash = b64encode(sha1(''.join(s)).digest())
log.debug(_('Capability hash generated: [%s]') % cap_hash)
log.debug(_(u'Capability hash generated: [%s]') % cap_hash)
return cap_hash
@defer.inlineCallbacks