diff src/plugins/plugin_misc_text_commands.py @ 927:cd150dd947e3

plugin text-commands: fixed name conflicts management + plugin parrot: removed now done TODO
author Goffi <goffi@goffi.org>
date Mon, 24 Mar 2014 13:49:37 +0100
parents d609581bf74a
children 73873e9b56f7
line wrap: on
line diff
--- a/src/plugins/plugin_misc_text_commands.py	Mon Mar 24 10:57:15 2014 +0100
+++ b/src/plugins/plugin_misc_text_commands.py	Mon Mar 24 13:49:37 2014 +0100
@@ -66,9 +66,9 @@
                     warning(_("Skipping cmd_ method"))
                 if cmd_name in self._commands:
                     suff=2
-                    while (cmd_name + suff) in self._commands:
+                    while (cmd_name + str(suff)) in self._commands:
                         suff+=1
-                    new_name = cmd_name + suff
+                    new_name = cmd_name + str(suff)
                     warning(_("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