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

@ -129,13 +129,13 @@ class XEP_0277(object):
# or defer.returnValue(Exception), it will explode and then the normal callback is ran.
if item.uri not in (NS_PUBSUB, NS_PUBSUB + "#event"):
log.error(_("Unsupported namespace {ns} in pubsub item {id}").format(ns=item.uri, id=item_id))
log.error(_(u"Unsupported namespace {ns} in pubsub item {id}").format(ns=item.uri, id=item_id))
defer.returnValue(exceptions.DataError())
try:
entry_elt = xpath(item_elt, 'entry')[0]
except IndexError:
log.error(_('No atom entry found in the pubsub item %s') % item_id)
log.error(_(u'No atom entry found in the pubsub item %s') % item_id)
defer.returnValue(exceptions.DataError())
microblog_data = {}
@ -159,7 +159,7 @@ class XEP_0277(object):
microblog_data['updated'] = date2float(entry_elt, 'updated')
assert('title' in microblog_data) # has been processed already
except IndexError:
log.error(_("Atom entry of pubsub item %s misses a required element") % item_id)
log.error(_(u"Atom entry of pubsub item %s misses a required element") % item_id)
defer.returnValue(exceptions.DataError())
if 'content' not in microblog_data: # use the atom title data as the microblog body content
@ -185,7 +185,7 @@ class XEP_0277(object):
microblog_data['comments_service'] = service.full()
microblog_data['comments_node'] = node
except (exceptions.DataError, RuntimeError, KeyError):
log.warning(_("Can't parse the link element of atom entry %s") % microblog_data['id'])
log.warning(_(u"Can't parse the link element of atom entry %s") % microblog_data['id'])
except:
pass
try:
@ -194,7 +194,7 @@ class XEP_0277(object):
try: # XXX: workaround for Jappix behaviour
microblog_data['author'] = xpath(entry_elt, 'author/nick')[0].text
except IndexError:
log.warning(_("Can't find author element in atom entry %s") % microblog_data['id'])
log.warning(_(u"Can't find author element in atom entry %s") % microblog_data['id'])
defer.returnValue(microblog_data)
@ -339,7 +339,7 @@ class XEP_0277(object):
def cb(result):
#Node is created with right permission
log.debug(_("Microblog node has now access %s") % access)
log.debug(_(u"Microblog node has now access %s") % access)
def fatal_err(s_error):
#Something went wrong