[gnome-continuous-yocto/gnomeostree-3.28-rocko: 6730/8267] runqemu: check exit code of 'ls -t'
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 6730/8267] runqemu: check exit code of 'ls -t'
- Date: Sun, 17 Dec 2017 05:15:18 +0000 (UTC)
commit 1b11a653d0be6128b26ea9421c783c6e78f7549b
Author: Ed Bartosh <ed bartosh linux intel com>
Date: Tue Jul 11 17:34:24 2017 +0300
runqemu: check exit code of 'ls -t'
Used check_output instead of Popen as it raises CalledProcessError
exception when command exits with non-zero exit code.
Catched the exception to produce user-friendly output.
[YOCTO #11719]
(From OE-Core rev: dac68d2323b0b630c019ce4d5256ed567eaf00da)
Signed-off-by: Ed Bartosh <ed bartosh linux intel com>
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
scripts/runqemu | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/scripts/runqemu b/scripts/runqemu
index c33741d..d44afc7 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -676,7 +676,10 @@ class BaseConfig(object):
else:
cmd = 'ls -t %s/*.qemuboot.conf' % deploy_dir_image
logger.info('Running %s...' % cmd)
- qbs = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
+ try:
+ qbs = subprocess.check_output(cmd, shell=True).decode('utf-8')
+ except subprocess.CalledProcessError as err:
+ raise RunQemuError(err)
if qbs:
for qb in qbs.split():
# Don't use initramfs when other choices unless fstype is ramfs
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]