diff src/plugins/plugin_misc_text_commands.py @ 1409:3265a2639182

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:57 +0200
parents 069ad98b360d
children 244a605623d6
line wrap: on
line diff
--- a/src/plugins/plugin_misc_text_commands.py	Thu Apr 16 13:31:14 2015 +0200
+++ b/src/plugins/plugin_misc_text_commands.py	Thu Apr 16 14:57:57 2015 +0200
@@ -138,7 +138,7 @@
             if attr.startswith('cmd_'):
                 cmd = getattr(instance, attr)
                 if not callable(cmd):
-                    log.warning(_("Skipping not callable [%s] attribute") % attr)
+                    log.warning(_(u"Skipping not callable [%s] attribute") % attr)
                     continue
                 cmd_name = attr[4:]
                 if not cmd_name:
@@ -148,7 +148,7 @@
                     while (cmd_name + str(suff)) in self._commands:
                         suff+=1
                     new_name = cmd_name + str(suff)
-                    log.warning(_("Conflict for command [%(old_name)s], renaming it to [%(new_name)s]") % {'old_name': cmd_name, 'new_name': new_name})
+                    log.warning(_(u"Conflict for command [%(old_name)s], renaming it to [%(new_name)s]") % {'old_name': cmd_name, 'new_name': new_name})
                     cmd_name = new_name
                 self._commands[cmd_name] = cmd_data = OrderedDict({'callback':cmd}) # We use an Ordered dict to keep documenation order
                 cmd_data.update(self._parseDocString(cmd, cmd_name))