aboutsummaryrefslogtreecommitdiff
path: root/run_project_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'run_project_tests.py')
-rwxr-xr-xrun_project_tests.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/run_project_tests.py b/run_project_tests.py
index d471460..8b7883b 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -204,8 +204,16 @@ def log_text_file(logfile, testdir, stdo, stde):
logfile.write(stde)
logfile.write('\n\n---\n\n')
if print_debug:
- print(stdo)
- print(stde, file=sys.stderr)
+ try:
+ print(stdo)
+ except UnicodeError:
+ sanitized_out = stdo.encode('ascii', errors='replace').decode()
+ print(sanitized_out)
+ try:
+ print(stde, file=sys.stderr)
+ except UnicodeError:
+ sanitized_err = stde.encode('ascii', errors='replace').decode()
+ print(sanitized_err, file=sys.stderr)
if stop:
print("Aborting..")
for f in futures: