diff src/server/blog.py @ 694:82123705474b

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:02 +0200
parents 9877607c719a
children d94feb0d849e
line wrap: on
line diff
--- a/src/server/blog.py	Thu Apr 16 13:29:26 2015 +0200
+++ b/src/server/blog.py	Thu Apr 16 14:57:02 2015 +0200
@@ -70,7 +70,7 @@
         if key != 'avatar':
             return
         entity_jid_s = entity_jid_s.lower()
-        log.debug(_("Received a new avatar for entity %s") % entity_jid_s)
+        log.debug(_(u"Received a new avatar for entity %s") % entity_jid_s)
         avatar = C.AVATARS_DIR + value
         self.avatars_cache[entity_jid_s] = avatar
         try:
@@ -95,7 +95,7 @@
             entity_jid_s = [key for (key, value) in self.waiting_deferreds.items() if value[0] == action_id][0]
         except IndexError:  # impossible to guess the entity
             return
-        log.debug(_("Using default avatar for entity %s") % entity_jid_s)
+        log.debug(_(u"Using default avatar for entity %s") % entity_jid_s)
         self.avatars_cache[entity_jid_s] = C.DEFAULT_AVATAR_URL
         self.waiting_deferreds[entity_jid_s][1].callback(C.DEFAULT_AVATAR_URL)
         del self.waiting_deferreds[entity_jid_s]