diff --git a/testsuite/unittests/test_unused_names.py b/testsuite/unittests/test_unused_names.py index f26cc8ed13..4624c12e93 100644 --- a/testsuite/unittests/test_unused_names.py +++ b/testsuite/unittests/test_unused_names.py @@ -83,6 +83,8 @@ def get_names(fname, pattern): grep_cmd = ["grep", "-ro", "names::[A-Za-Z0-9_]*", source_dir] names_used_raw = check_output(grep_cmd) +if isinstance(names_used_raw, bytes): + names_used_raw = str(names_used_raw.decode()) names_used = set() for line in names_used_raw.split("\n"):