[projects/pld-builder.new/new-builddir-new: 18/21] output gpg stderr if present
draenog
draenog at pld-linux.org
Mon Oct 29 11:58:30 CET 2012
commit cbcf958393d9f6857a178393d3a45f4e8bb8516f
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/6fbf8d5befabd83f4260bf17d230d8b32ec42ec2
More information about the pld-cvs-commit
mailing list