From 3f77f6d5e0a63aed64d58fb8e8276b098cef2486 Mon Sep 17 00:00:00 2001 From: Trung Tran Date: Sun, 20 Jan 2019 02:00:52 -0800 Subject: devtest: add universal_newlines to subprocess call subprocess call in python3+ return stderr and stdout object is byte object instead of text. This caused many issue with parsing the ouput in devtest. These are not an issue in python2. This change will make devtest more python3 compatible. Signed-off-by: Trung.Tran --- host/tests/devtest/usrp_probe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/tests/devtest/usrp_probe.py') diff --git a/host/tests/devtest/usrp_probe.py b/host/tests/devtest/usrp_probe.py index 43dd999c1..c7b73288e 100644 --- a/host/tests/devtest/usrp_probe.py +++ b/host/tests/devtest/usrp_probe.py @@ -17,7 +17,7 @@ def get_usrp_list(device_filter=None, env=None): cmd = ['uhd_find_devices'] if device_filter is not None: cmd += ['--args', device_filter] - output = subprocess.check_output(cmd, env=env) + output = subprocess.check_output(cmd, env=env, universal_newlines=True) except subprocess.CalledProcessError: return [] split_re = "\n*-+\n-- .*\n-+\n" -- cgit v1.2.3