comparison commands.py @ 227:87fa6bc893de

(commands) convert unicode to string before passing it to shlex Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Sun, 07 Mar 2010 17:06:26 +0100
parents d527d7b75f56
children 70938f01be8f
comparison
equal deleted inserted replaced
226:0d85049ac68d 227:87fa6bc893de
29 29
30 commands = ['xmpp-participants', 'irc-participants', 'xmpp-connections', 'irc-connections', 'connections', 'bridges'] 30 commands = ['xmpp-participants', 'irc-participants', 'xmpp-connections', 'irc-connections', 'connections', 'bridges']
31 admin_commands = ['add-bridge', 'add-xmpp-admin', 'change-bridges-mode', 'debug', 'halt', 'remove-bridges', 'restart-bot', 'restart-bridges', 'stop-bot', 'stop-bridges'] 31 admin_commands = ['add-bridge', 'add-xmpp-admin', 'change-bridges-mode', 'debug', 'halt', 'remove-bridges', 'restart-bot', 'restart-bridges', 'stop-bot', 'stop-bridges']
32 32
33 def execute(bot, command_line, bot_admin, bridge): 33 def execute(bot, command_line, bot_admin, bridge):
34 command = shlex.split(command_line) 34 command = shlex.split(str(command_line))
35 if len(command) > 1: 35 if len(command) > 1:
36 args_array = command[1:] 36 args_array = command[1:]
37 else: 37 else:
38 args_array = [] 38 args_array = []
39 command = command[0] 39 command = command[0]