From f72681803ee283536c595ae752489a9b6f2c4584 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karl=20Hasselstr=C3=B6m?= Date: Tue, 9 Oct 2007 06:20:34 +0200 Subject: [PATCH] Fix error message generation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The right-hand-side operand of % is supposed to be a tuple with the same number of arguments as there are formatting codes in the left-hand-side operand, or just any value if there is just one formatting code; however, here it was a variable with a tuple value, which didn't work. So wrap it in a tuple of length one, and all is well again. Signed-off-by: Karl Hasselström --- stgit/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stgit/run.py b/stgit/run.py index 989bb27..83bf5f5 100644 --- a/stgit/run.py +++ b/stgit/run.py @@ -40,7 +40,7 @@ class Run: self.__cmd = list(cmd) for c in cmd: if type(c) != str: - raise Exception, 'Bad command: %r' % cmd + raise Exception, 'Bad command: %r' % (cmd,) self.__good_retvals = [0] self.__env = None self.__indata = None -- 2.11.0