From 52f24290b1b3d1620796c50866e7d8016a10807d Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Mon, 31 Jul 2017 11:36:45 -0400 Subject: More fixes for coverage_report.py Change the defaults for the directory arguments to be lists, since that is what argparse gives when the user provides a value. Also changed type of os.mkdirs to os.makedirs. Bug: Change-Id: I04c15323efedc9483327c01bab18d45ffffdc21b Reviewed-on: https://pdfium-review.googlesource.com/9590 Reviewed-by: Henrique Nakashima Commit-Queue: Ryan Harrison --- tools/coverage/coverage_report.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/coverage/coverage_report.py b/tools/coverage/coverage_report.py index c74b6bf49b..bb2d4e1396 100755 --- a/tools/coverage/coverage_report.py +++ b/tools/coverage/coverage_report.py @@ -87,7 +87,7 @@ class CoverageExecutor(object): self.output_directory = args['output_directory'] if not os.path.exists(self.output_directory): if not self.dry_run: - os.mkdirs(self.output_directory) + os.makedirs(self.output_directory) elif not os.path.isdir(self.output_directory): parser.error('%s exists, but is not a directory' % self.output_directory) self.coverage_totals_path = os.path.join(self.output_directory, @@ -338,14 +338,12 @@ def main(): parser.add_argument( '-s', '--source_directory', - nargs=1, help='Location of PDFium source directory, defaults to CWD', default=os.getcwd()) build_default = os.path.join('out', 'Coverage') parser.add_argument( '-b', '--build_directory', - nargs=1, help= 'Location of PDFium build directory with coverage enabled, defaults to ' '%s under CWD' % build_default, @@ -354,7 +352,6 @@ def main(): parser.add_argument( '-o', '--output_directory', - nargs=1, help='Location to write out coverage report to, defaults to %s under CWD ' % output_default, default=os.path.join(os.getcwd(), output_default)) -- cgit v1.2.3