summaryrefslogtreecommitdiff
path: root/testing/tools
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-09-03 14:50:01 -0700
committerLei Zhang <thestig@chromium.org>2015-09-03 14:50:01 -0700
commit44aa03e275cab653aeca479b66d4f6e58183eb16 (patch)
treeef179755de1230612257f920cd16eb71414400c3 /testing/tools
parent928c183ece333e4eb55acbbd8036cf473b94f516 (diff)
downloadpdfium-44aa03e275cab653aeca479b66d4f6e58183eb16.tar.xz
Merge to XFA: Change fixup_pdf_template.py to open files in binary mode.
Fix for the pixel test failure on Windows from commit 870b5b6793fa. Seems to work for me on Windows. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1312493006 . (cherry picked from commit 7c9e4529f63cc2ba47dd9585058c8ee8e546bc1a) Review URL: https://codereview.chromium.org/1319183004 .
Diffstat (limited to 'testing/tools')
-rwxr-xr-xtesting/tools/fixup_pdf_template.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/testing/tools/fixup_pdf_template.py b/testing/tools/fixup_pdf_template.py
index a43db55ee9..80a712f6e8 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: