From 7ce385b6f8078354a7473c7af25b96c820b4c76f Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 28 Dec 2015 20:01:17 +0100 Subject: [PATCH] Don't substitude in errorInvalid. Closes GH-49. Why was it doing substitutions in the first place? --- src/callbacks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/callbacks.py b/src/callbacks.py index 4a109f3bf..74d1041d8 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -549,7 +549,9 @@ class RichReplyMethods(object): v = _('That\'s not a valid %s.') % what if 'Raise' not in kwargs: kwargs['Raise'] = True - return self._error(self.__makeReply(v, s), **kwargs) + if s: + v += ' ' + s + return self._error(v, **kwargs) _repr = repr