From 9463c5965e859b8a9686ee1eaa7bfed8fd4bccc6 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 21 Feb 2016 12:58:53 +0200 Subject: Swallow stderr of helper process invocation because nobody needs to see it and it causes problems in Debian testing framework. --- mesonbuild/mesonlib.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'mesonbuild/mesonlib.py') diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index a814567..8244f0c 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -160,11 +160,12 @@ def version_compare(vstr1, vstr2): return cmpop(varr1, varr2) def default_libdir(): - try: - archpath = subprocess.check_output(['dpkg-architecture', '-qDEB_HOST_MULTIARCH']).decode().strip() + pc = subprocess.Popen(['dpkg-architecture', '-qDEB_HOST_MULTIARCH'], + stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) + (stdo, _) = pc.communicate() + if pc.returncode == 0: + archpath = stdo.decode().strip() return 'lib/' + archpath - except: - pass if os.path.isdir('/usr/lib64'): return 'lib64' return 'lib' -- cgit v1.1