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

Unified Diff: testing/tools/fixup_pdf_template.py

Issue 1312493006: Change fixup_pdf_template.py to open files in binary mode. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/tools/fixup_pdf_template.py
diff --git a/testing/tools/fixup_pdf_template.py b/testing/tools/fixup_pdf_template.py
index a43db55ee9f51b9f8ab1889c46e1de88ac7e6d06..80a712f6e89d6903d372a36935f70057b09c538e 100755
--- a/testing/tools/fixup_pdf_template.py
+++ b/testing/tools/fixup_pdf_template.py
@@ -74,8 +74,8 @@ class TemplateProcessor:
def expand_file(input_path, output_path):
processor = TemplateProcessor()
try:
- with open(input_path, 'r') as infile:
- with open(output_path, 'w') as outfile:
+ with open(input_path, 'rb') as infile:
+ with open(output_path, 'wb') as outfile:
for line in infile:
outfile.write(processor.process_line(line))
except IOError:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698