[elbe-devel] [PATCH] elbe: gpg: fix error message

Kurt Kanzenbach kurt at linutronix.de
Tue Jun 20 08:32:02 CEST 2017


When using elbe sign command and the fingerprint is unknown the error message is
wrong. Example:

kurt at kurt ~ % git/elbe/elbe sign <file> asd
Error signing file not all arguments converted during string formatting

This patch fixes the error message:

kurt at kurt ~ % git/elbe/elbe sign <file> asd
no key with fingerprint asd: Invalid value

Signed-off-by: Kurt Kanzenbach <kurt at linutronix.de>
---
 elbepack/gpg.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbepack/gpg.py b/elbepack/gpg.py
index d03eb39..b339be9 100644
--- a/elbepack/gpg.py
+++ b/elbepack/gpg.py
@@ -159,7 +159,7 @@ def sign (infile, outfile, fingerprint):
     try:
         key = ctx.get_key(fingerprint)
     except gpgme.GpgmeError as ex:
-        print 'no key with fingerprint %s: %s' % (fingerprint % ex.message)
+        print 'no key with fingerprint %s: %s' % (fingerprint, ex.message)
         pass
 
     ctx.signers = [key]
-- 
2.1.4





More information about the elbe-devel mailing list