From ce24d4c3632b71939ad198268a900ee823a89b27 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Thu, 21 Jul 2016 15:59:40 +0100 Subject: lib/oe/gpg_sign: fix output in error paths oe.utils.getstatusoutput() is a wrapper for subprocess.getstatusoutput() which uses Universal Newlines, so the output is a str() not bytes(). Signed-off-by: Ross Burton --- meta/lib/oe/gpg_sign.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'meta') diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py index a8a478aa95..38eb0cb137 100644 --- a/meta/lib/oe/gpg_sign.py +++ b/meta/lib/oe/gpg_sign.py @@ -24,7 +24,7 @@ class LocalSigner(object): status, output = oe.utils.getstatusoutput(cmd) if status: raise bb.build.FuncFailed('Failed to export gpg public key (%s): %s' % - (keyid, output.decode("utf-8"))) + (keyid, output)) def sign_rpms(self, files, keyid, passphrase): """Sign RPM files""" @@ -39,7 +39,7 @@ class LocalSigner(object): status, output = oe.utils.getstatusoutput(cmd) if status: - raise bb.build.FuncFailed("Failed to sign RPM packages: %s" % output.decode("utf-8")) + raise bb.build.FuncFailed("Failed to sign RPM packages: %s" % output) def detach_sign(self, input_file, keyid, passphrase_file, passphrase=None, armor=True): """Create a detached signature of a file""" @@ -113,4 +113,3 @@ def get_signer(d, backend): return LocalSigner(d) else: bb.fatal("Unsupported signing backend '%s'" % backend) - -- cgit v1.2.3