We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ba7650b + d42e155 commit 1ca7bd7Copy full SHA for 1ca7bd7
run_sk_stress_test
@@ -21,6 +21,7 @@ import json
21
import subprocess
22
import argparse
23
import platform
24
+import codecs
25
26
import common
27
@@ -337,6 +338,14 @@ class StressTesterRunner(object):
337
338
except OSError:
339
pass
340
341
+if os.isatty(sys.stdout.fileno()):
342
+ encoding = sys.stdout.encoding
343
+ errors = 'replace'
344
+else:
345
+ encoding = 'utf-8'
346
+ errors = None
347
+sys.stdout = codecs.getwriter(encoding)(sys.stdout, errors=errors)
348
+
349
if __name__ == '__main__':
350
sys.exit(main())
351
0 commit comments