mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 03:49:32 +02:00
sanity/patch.py: Remove commands module usage
The commands module is removed in python3. Use the subprocess module instead and the pipes module to replace the mkargs usage. (From OE-Core rev: e2e1dcd74bc45381baccf507c0309dd792229afe) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -71,7 +71,7 @@ ALTERNATIVE_PRIORITY = "100"
|
||||
ALTERNATIVE_LINK_NAME[psplash] = "${bindir}/psplash"
|
||||
|
||||
python do_compile () {
|
||||
import shutil, commands
|
||||
import shutil, subprocess
|
||||
|
||||
# Build a separate executable for each splash image
|
||||
convertscript = "%s/make-image-header.sh" % d.getVar('S', True)
|
||||
@@ -80,7 +80,7 @@ python do_compile () {
|
||||
outputfiles = d.getVar('SPLASH_INSTALL', True).split()
|
||||
for localfile, outputfile in zip(localfiles, outputfiles):
|
||||
if localfile.endswith(".png"):
|
||||
outp = commands.getstatusoutput('%s %s POKY' % (convertscript, localfile))
|
||||
outp = subprocess.getstatusoutput('%s %s POKY' % (convertscript, localfile))
|
||||
print(outp[1])
|
||||
fbase = os.path.splitext(os.path.basename(localfile))[0]
|
||||
shutil.copyfile("%s-img.h" % fbase, destfile)
|
||||
|
||||
Reference in New Issue
Block a user