Fixed wrong string formatting call
authorMarcin Kuźmiński <marcin@python-blog.com>
Mon, 11 Aug 2014 19:56:27 +0000 (21:56 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 11 Aug 2014 20:03:24 +0000 (22:03 +0200)
The number of arguments were missing last one. As discussed it's debugging error, so we actually want the arguments to be printed in the error. This commit fixes the formatting error, and adds the list of arguments to be printed together with the error.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
dulwich/hooks.py

index eae655ccc04050b7beadb3196b1c5e853eb9bde6..98fa405bca491493d9fa4988982f2bff272dd9cf 100644 (file)
@@ -76,8 +76,8 @@ class ShellHook(Hook):
 
         if len(args) != self.numparam:
             raise HookError("Hook %s executed with wrong number of args. \
-                            Expected %d. Saw %d. %s"
-                            % (self.name, self.numparam, len(args)))
+                            Expected %d. Saw %d. args: %s"
+                            % (self.name, self.numparam, len(args), args))
 
         if (self.pre_exec_callback is not None):
             args = self.pre_exec_callback(*args)