[projects/pld-builder.new/new-builddir] output gpg stderr if present

glen glen at pld-linux.org
Sat Oct 27 16:34:42 CEST 2012


commit a33850dcde021ecd15557a37d29b47bf9328f0c1
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Oct 27 16:28:42 2012 +0200

    output gpg stderr if present

 PLD_Builder/gpg.py | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/PLD_Builder/gpg.py b/PLD_Builder/gpg.py
index 5c5dbec..aeb8ebd 100644
--- a/PLD_Builder/gpg.py
+++ b/PLD_Builder/gpg.py
@@ -78,6 +78,7 @@ def sign(buf):
     d_stdout = None
     d_stderr = None
     cmd = ['/usr/bin/gpg', '--batch', '--no-tty', '--clearsign']
+    # TODO: check for gpg return code!
     gpg_run = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
     try:
         d_stdout, d_stderr = gpg_run.communicate(buf.encode('utf-8'))
@@ -85,4 +86,7 @@ def sign(buf):
         log.error("gnupg signing failed, does gpg binary exist? : %s" % e)
         raise
 
+    if len(d_stderr):
+        log.error("gpg: %s" % d_stderr)
+
     return d_stdout
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/0cfedb45f97cdfe0542e01e3564e75f60362e1e1



More information about the pld-cvs-commit mailing list