summaryrefslogtreecommitdiffstats
path: root/utils/genrandconfig
diff options
context:
space:
mode:
authorArnout Vandecappelle <arnout@mind.be>2017-07-21 03:05:09 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-25 22:41:57 +0200
commit59419cdac1af86abbd780305b33136d28f11d3ec (patch)
treea2ecff8e1c57ea15694fdb15182995ad6ef47fe4 /utils/genrandconfig
parent86ca7a04a81a56dd22c2b9c229598be56baf0cc0 (diff)
downloadbuildroot-59419cdac1af86abbd780305b33136d28f11d3ec.tar.gz
buildroot-59419cdac1af86abbd780305b33136d28f11d3ec.zip
genrandconfig: use subprocess.check_output instead of Popen
Popen is more complicated and more difficult to understand. check_output raises an exception if the exit code is non-zero, but that's probably what we want if ldd can't be executed. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'utils/genrandconfig')
-rwxr-xr-xutils/genrandconfig2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/genrandconfig b/utils/genrandconfig
index 6d3269225d..a7fe7ceca9 100755
--- a/utils/genrandconfig
+++ b/utils/genrandconfig
@@ -184,7 +184,7 @@ def is_toolchain_usable(**kwargs):
if 'BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM=y\n' in configlines or \
'BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64=y\n' in configlines or \
'BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB=y\n' in configlines:
- ldd_version_output = subprocess.Popen(['ldd', '--version'], stdout=subprocess.PIPE).communicate()[0]
+ ldd_version_output = subprocess.check_output(['ldd', '--version'])
glibc_version = ldd_version_output.splitlines()[0].split()[-1]
if StrictVersion('2.14') > StrictVersion(glibc_version):
log_write(log, "WARN: ignoring the Linaro ARM toolchains becausee too old host glibc")
OpenPOWER on IntegriCloud