mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
f02f0edeaa
commit
2eec44ee23
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user