commands.py: Fix crash if a custom error message is provided to somethingWithoutSpaces (bug introduced in 29dc1438a0).

This commit is contained in:
Valentin Lorentz 2013-08-15 22:25:36 +02:00
parent a2f115e09f
commit b375e7dfb2

View File

@ -600,8 +600,8 @@ def getSomething(irc, msg, args, state, errorMsg=None, p=None):
def getSomethingNoSpaces(irc, msg, args, state, *L):
def p(s):
return len(s.split(None, 1)) == 1
getSomething(irc, msg, args, state, p=p, errorMsg=_('You must not give a '
'string containing spaces as an argument.'), *L)
L = L or [_('You must not give a string containing spaces as an argument.')]
getSomething(irc, msg, args, state, p=p, *L)
def private(irc, msg, args, state):
if irc.isChannel(msg.args[0]):