Skip to content

Commit 947cf88

Browse files
Merge Pull Request #14667 from sebrowne/Trilinos/mpi-comm-world-checker-utf8-fix
Automatically Merged using Trilinos Pull Request AutoTester PR Title: b'Framework: MPI_COMM_WORLD checker UTF8 fix' PR Author: sebrowne
2 parents 41e2cbb + 124478e commit 947cf88

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

commonTools/test/utilities/check-mpi-comm-world-usage.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,15 @@ def get_changed_files(target_branch, feature_branch):
8585
start_commit,
8686
feature_branch
8787
]
88-
result = subprocess.check_output(cmd).decode("utf-8")
89-
90-
return parse_diff_output(result)
88+
out = subprocess.check_output(cmd)
89+
result = []
90+
for line in out.splitlines():
91+
try:
92+
result.append(line.decode("utf-8"))
93+
except UnicodeDecodeError:
94+
print(f"WARNING: Line {line} contains non-UTF8 characters; ignoring it")
95+
96+
return parse_diff_output("\n".join(result))
9197

9298

9399
def print_occurences(changed_files, title):

0 commit comments

Comments
 (0)