From b375e7dfb298e958ba24233f2a0336daf4841d82 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Thu, 15 Aug 2013 22:25:36 +0200 Subject: [PATCH] commands.py: Fix crash if a custom error message is provided to somethingWithoutSpaces (bug introduced in 29dc1438a0). --- src/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands.py b/src/commands.py index f683f3fde..ac0e28622 100644 --- a/src/commands.py +++ b/src/commands.py @@ -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]):