git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[StGit PATCH] Fix error message generation

From
Karl Hasselström <kha@treskal.com>
Date
Oct 9, 2007, 04:40 UTC
Message-ID
<20071009044045.11981.93951.stgit@yoghurt>

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 <kha@treskal.com>
---
 stgit/run.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
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
Message 1 of 1 in “Fix error message generation”
  1. Fix error message generationKarl Hasselström, Oct 9, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.