diff options
author | Ross Burton <ross.burton@intel.com> | 2016-07-21 15:59:40 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-26 08:56:29 +0100 |
commit | 2eec44ee23e52e439a66fd5296acbf866ca575fe (patch) | |
tree | 831626c88b80cce46befeff57b9ecd55871c2e4e /meta/lib/oe | |
parent | f02f0edeaabb7b5c437dfb7a4bf174fe29ab5a87 (diff) | |
download | poky-2eec44ee23e52e439a66fd5296acbf866ca575fe.tar.gz |
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().
(From OE-Core rev: ce24d4c3632b71939ad198268a900ee823a89b27)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r-- | meta/lib/oe/gpg_sign.py | 5 |
1 files changed, 2 insertions, 3 deletions
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): | |||
24 | status, output = oe.utils.getstatusoutput(cmd) | 24 | status, output = oe.utils.getstatusoutput(cmd) |
25 | if status: | 25 | if status: |
26 | raise bb.build.FuncFailed('Failed to export gpg public key (%s): %s' % | 26 | raise bb.build.FuncFailed('Failed to export gpg public key (%s): %s' % |
27 | (keyid, output.decode("utf-8"))) | 27 | (keyid, output)) |
28 | 28 | ||
29 | def sign_rpms(self, files, keyid, passphrase): | 29 | def sign_rpms(self, files, keyid, passphrase): |
30 | """Sign RPM files""" | 30 | """Sign RPM files""" |
@@ -39,7 +39,7 @@ class LocalSigner(object): | |||
39 | 39 | ||
40 | status, output = oe.utils.getstatusoutput(cmd) | 40 | status, output = oe.utils.getstatusoutput(cmd) |
41 | if status: | 41 | if status: |
42 | raise bb.build.FuncFailed("Failed to sign RPM packages: %s" % output.decode("utf-8")) | 42 | raise bb.build.FuncFailed("Failed to sign RPM packages: %s" % output) |
43 | 43 | ||
44 | def detach_sign(self, input_file, keyid, passphrase_file, passphrase=None, armor=True): | 44 | def detach_sign(self, input_file, keyid, passphrase_file, passphrase=None, armor=True): |
45 | """Create a detached signature of a file""" | 45 | """Create a detached signature of a file""" |
@@ -113,4 +113,3 @@ def get_signer(d, backend): | |||
113 | return LocalSigner(d) | 113 | return LocalSigner(d) |
114 | else: | 114 | else: |
115 | bb.fatal("Unsupported signing backend '%s'" % backend) | 115 | bb.fatal("Unsupported signing backend '%s'" % backend) |
116 | |||