From 566d0b9486f024f253d1c331866b04529c9a22b3 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 13 Feb 2018 20:45:02 +0000 Subject: Fix nits in Python code. Change-Id: I01956bff9e7250c9df84afe6b6de96ab4e9b4851 Reviewed-on: https://pdfium-review.googlesource.com/26650 Commit-Queue: Ryan Harrison Reviewed-by: Ryan Harrison --- testing/tools/fixup_pdf_template.py | 6 +++--- testing/tools/test_runner.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/testing/tools/fixup_pdf_template.py b/testing/tools/fixup_pdf_template.py index 10ca241242..0f31eccada 100755 --- a/testing/tools/fixup_pdf_template.py +++ b/testing/tools/fixup_pdf_template.py @@ -35,7 +35,7 @@ class TemplateProcessor: TRAILER_TOKEN = '{{trailer}}' TRAILER_REPLACEMENT = 'trailer<< /Root 1 0 R /Size %d >>' - STARTXREF_TOKEN= '{{startxref}}' + STARTXREF_TOKEN = '{{startxref}}' STARTXREF_REPLACEMENT = 'startxref\n%d' OBJECT_PATTERN = r'\{\{object\s+(\d+)\s+(\d+)\}\}' @@ -45,7 +45,7 @@ class TemplateProcessor: self.offset = 0 self.xref_offset = 0 self.max_object_number = 0 - self.objects = { } + self.objects = {} def insert_xref_entry(self, object_number, generation_number): self.objects[object_number] = (self.offset, generation_number) @@ -86,7 +86,7 @@ def expand_file(input_path, output_path): with open(input_path, 'rb') as infile: with open(output_path, 'wb') as outfile: for line in infile: - outfile.write(processor.process_line(line)) + outfile.write(processor.process_line(line)) except IOError: print >> sys.stderr, 'failed to process %s' % input_path diff --git a/testing/tools/test_runner.py b/testing/tools/test_runner.py index e895552bc8..99ba8758e0 100644 --- a/testing/tools/test_runner.py +++ b/testing/tools/test_runner.py @@ -3,7 +3,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import cStringIO import functools import multiprocessing import optparse -- cgit v1.2.3