Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Unified Diff: telemetry/telemetry/internal/results/results_options.py

Issue 1998943002: [Telemetry] Cast results to unicode utf-8 before write it to html_output_format's output stream (Closed) Base URL: https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « telemetry/telemetry/internal/results/html_output_formatter.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/results/results_options.py
diff --git a/telemetry/telemetry/internal/results/results_options.py b/telemetry/telemetry/internal/results/results_options.py
index c2484f72af99003b75cd10e83d7cb334f2be2dec..a58630c79f2953ecc3337382a91daf55ee4223f4 100644
--- a/telemetry/telemetry/internal/results/results_options.py
+++ b/telemetry/telemetry/internal/results/results_options.py
@@ -100,9 +100,9 @@ def _GetOutputStream(output_format, output_dir):
# TODO(eakuefner): Factor this hack out after we rewrite HTMLOutputFormatter.
if output_format == 'html' or output_format == 'html2':
open(output_file, 'a').close() # Create file if it doesn't exist.
- return codecs.open(output_file, 'r+', 'utf-8')
+ return codecs.open(output_file, mode='r+', encoding='utf-8')
else:
- return codecs.open(output_file, 'w+', 'utf-8')
+ return open(output_file, mode='w+')
def _GetProgressReporter(output_skipped_tests_summary, suppress_gtest_report):
« no previous file with comments | « telemetry/telemetry/internal/results/html_output_formatter.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698