[OE-core] [PATCH 01/45] scripts/runqemu: Replace subprocess.run() for compatibilty

Armin Kuster akuster808 at gmail.com
Thu Dec 13 21:38:09 UTC 2018


From: Michael Halstead <mhalstead at linuxfoundation.org>

subprocess.run() was introduced in Python 3.5. We currently support down to
Python 3.4 so I've replaced it with subprocess.check_call() which is available
in that version.

(From OE-Core rev: 1c61f3017a6a2d95747883c722c376763ec77c9d)

Signed-off-by: Michael Halstead <mhalstead at linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/runqemu | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index bd3aee0..c9a351e 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1313,7 +1313,7 @@ def main():
             logger.info("SIGTERM received")
             os.kill(config.qemupid, signal.SIGTERM)
             config.cleanup()
-            subprocess.run(["tput", "smam"])
+            subprocess.check_call(["tput", "smam"])
         signal.signal(signal.SIGTERM, sigterm_handler)
 
         config.check_args()
@@ -1335,7 +1335,7 @@ def main():
         return 1
     finally:
         config.cleanup()
-        subprocess.run(["tput", "smam"])
+        subprocess.check_call(["tput", "smam"])
 
 if __name__ == "__main__":
     sys.exit(main())
-- 
2.7.4



More information about the Openembedded-core mailing list