diff src/browser/libervia_main.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 7a9c7b9f6a28
children c2f22ca12e23
line wrap: on
line diff
--- a/src/browser/libervia_main.py	Thu Apr 16 13:29:26 2015 +0200
+++ b/src/browser/libervia_main.py	Thu Apr 16 14:57:02 2015 +0200
@@ -258,14 +258,14 @@
         return ret
 
     def registerWidget(self, wid):
-        log.debug("Registering %s" % wid.getDebugName())
+        log.debug(u"Registering %s" % wid.getDebugName())
         self.libervia_widgets.add(wid)
 
     def unregisterWidget(self, wid):
         try:
             self.libervia_widgets.remove(wid)
         except KeyError:
-            log.warning('trying to remove a non registered Widget: %s' % wid.getDebugName())
+            log.warning(u'trying to remove a non registered Widget: %s' % wid.getDebugName())
 
     def refresh(self):
         """Refresh the general display."""
@@ -369,7 +369,7 @@
 
         def domain_cb(value):
             self._defaultDomain = value
-            log.info("new account domain: %s" % value)
+            log.info(u"new account domain: %s" % value)
 
         def domain_eb(value):
             self._defaultDomain = "libervia.org"
@@ -418,7 +418,7 @@
         return contact_list
 
     def newWidget(self, wid):
-        log.debug("newWidget: {}".format(wid))
+        log.debug(u"newWidget: {}".format(wid))
         self.addWidget(wid)
 
     def newMessageHandler(self, from_jid_s, msg, type_, to_jid_s, extra, profile=C.PROF_KEY_NONE):
@@ -515,7 +515,7 @@
         for publisher in mblogs:
             for mblog in mblogs[publisher][0]:
                 if 'content' not in mblog:
-                    log.warning("No content found in microblog [%s]" % mblog)
+                    log.warning(u"No content found in microblog [%s]" % mblog)
                     continue
                 if 'groups' in mblog:
                     _groups = set(mblog['groups'].split() if mblog['groups'] else [])
@@ -626,7 +626,6 @@
         elif event_type == 'MICROBLOG_DELETE':
             for wid in self.widgets.getWidgets(blog.MicroblogPanel):
                 wid.removeEntry(data['type'], data['id'])
-            log.debug("%s %s %s" % (self.whoami.bare, sender, data['type']))
 
             if sender == self.whoami.bare and data['type'] == 'main_item':
                 for index in xrange(0, len(self.mblog_cache)):
@@ -646,7 +645,7 @@
             mblog_panel.addEntryIfAccepted(self.whoami.bare, *cache_entry)
 
     def getEntityMBlog(self, entity):
-        log.info("geting mblog for entity [%s]" % (entity,))
+        log.info(u"geting mblog for entity [%s]" % (entity,))
         for lib_wid in self.libervia_widgets:
             if isinstance(lib_wid, blog.MicroblogPanel):
                 if lib_wid.isJidAccepted(entity):