diff --git a/cps/subproc_wrapper.py b/cps/subproc_wrapper.py index 27375686..3cc4a070 100644 --- a/cps/subproc_wrapper.py +++ b/cps/subproc_wrapper.py @@ -52,10 +52,11 @@ def process_wait(command, serr=subprocess.PIPE, pattern=""): p.wait() for line in p.stdout.readlines(): if isinstance(line, bytes): - line = line.decode('utf-8') + line = line.decode('utf-8', errors="ignore") match = re.search(pattern, line, re.IGNORECASE) if match and ret_val == "": ret_val = match + break p.stdout.close() p.stderr.close() return ret_val