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/uhd_test_base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'host/tests/devtest/uhd_test_base.py') diff --git a/host/tests/devtest/uhd_test_base.py b/host/tests/devtest/uhd_test_base.py index d77226941..8d965eef7 100755 --- a/host/tests/devtest/uhd_test_base.py +++ b/host/tests/devtest/uhd_test_base.py @@ -77,7 +77,8 @@ class shell_application(object): stdout=PIPE, stderr=PIPE, close_fds=True, - env=env + env=env, + universal_newlines=True ) self.stdout, self.stderr = proc.communicate() self.returncode = proc.returncode -- cgit v1.2.3