comparison commands.py @ 203:2a81c480439a

renamed camelCased functions Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Thu, 25 Feb 2010 23:29:39 +0100
parents 5af6c828c606
children d527d7b75f56
comparison
equal deleted inserted replaced
202:2a1ee46f86af 203:2a81c480439a
61 raise IndexError 61 raise IndexError
62 b.append(bot.bridges[bn-1]) 62 b.append(bot.bridges[bn-1])
63 except IndexError: 63 except IndexError:
64 ret += '\nInvalid bridge number "'+str(bn)+'".' 64 ret += '\nInvalid bridge number "'+str(bn)+'".'
65 except ValueError: 65 except ValueError:
66 found_bridges = bot.findBridges(arg) 66 found_bridges = bot.find_bridges(arg)
67 if len(found_bridges) == 0: 67 if len(found_bridges) == 0:
68 ret += '\nNo bridge found matching "'+arg+'".' 68 ret += '\nNo bridge found matching "'+arg+'".'
69 else: 69 else:
70 b.extend(found_bridges) 70 b.extend(found_bridges)
71 71
150 except Exception as e: 150 except Exception as e:
151 return '\n'+e.args[1] 151 return '\n'+e.args[1]
152 152
153 found_bridges, ret = _find_bridges(bot, args.bridge_id) 153 found_bridges, ret = _find_bridges(bot, args.bridge_id)
154 for found_bridge in found_bridges: 154 for found_bridge in found_bridges:
155 r = found_bridge.changeMode(args.new_mode) 155 r = found_bridge.change_mode(args.new_mode)
156 if r: 156 if r:
157 ret += r+'\n' 157 ret += r+'\n'
158 158
159 if ret: 159 if ret:
160 return ret 160 return ret
243 return '\n'+e.args[1] 243 return '\n'+e.args[1]
244 244
245 found_bridges, ret = _find_bridges(bot, args.bridge_id) 245 found_bridges, ret = _find_bridges(bot, args.bridge_id)
246 246
247 for found_bridge in found_bridges: 247 for found_bridge in found_bridges:
248 bot.removeBridge(found_bridge) 248 bot.remove_bridge(found_bridge)
249 249
250 return ret+'Bridges removed.' 250 return ret+'Bridges removed.'
251 251
252 252
253 def restart_bot(bot, command, args_array, bridge): 253 def restart_bot(bot, command, args_array, bridge):