diff --git a/interop.py b/interop.py index 93a83e61..024e64a1 100644 --- a/interop.py +++ b/interop.py @@ -140,7 +140,7 @@ def _check_impl_is_compliant(self, name: str) -> bool: ) if not self._is_unsupported(output.stdout.splitlines()): logging.error("%s client not compliant.", name) - logging.debug("%s", output.stdout.decode("utf-8")) + logging.debug("%s", output.stdout.decode("utf-8", errors="replace")) self.compliant[name] = False return False logging.debug("%s client compliant.", name) @@ -166,7 +166,7 @@ def _check_impl_is_compliant(self, name: str) -> bool: ) if not self._is_unsupported(output.stdout.splitlines()): logging.error("%s server not compliant.", name) - logging.debug("%s", output.stdout.decode("utf-8")) + logging.debug("%s", output.stdout.decode("utf-8", errors="replace")) self.compliant[name] = False return False logging.debug("%s server compliant.", name) @@ -310,7 +310,9 @@ def _copy_logs(self, container: str, dir: tempfile.TemporaryDirectory): ) if r.returncode != 0: logging.info( - "Copying logs from %s failed: %s", container, r.stdout.decode("utf-8") + "Copying logs from %s failed: %s", + container, + r.stdout.decode("utf-8", errors="replace"), ) def _run_testcase( @@ -393,7 +395,7 @@ def _run_test( output = ex.stdout expired = True - logging.debug("%s", output.decode("utf-8")) + logging.debug("%s", output.decode("utf-8", errors="replace")) if expired: logging.debug("Test failed: took longer than %ds.", testcase.timeout()) @@ -404,7 +406,7 @@ def _run_test( stderr=subprocess.STDOUT, timeout=60, ) - logging.debug("%s", r.stdout.decode("utf-8")) + logging.debug("%s", r.stdout.decode("utf-8", errors="replace")) # copy the pcaps from the simulator self._copy_logs("sim", sim_log_dir)