Commit 78f5b40d authored by Eric Stevenson's avatar Eric Stevenson Committed by Commit Bot

Super size: Fix typo in generate_milestone_report.py.

Also fix incorrect usage of json.dump().

Change-Id: I5b02f9fead661f84d68eec8126101cc26c6110af
Reviewed-on: https://chromium-review.googlesource.com/1159929
Commit-Queue: Eric Stevenson <estevenson@chromium.org>
Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580399}
parent d26a9005
...@@ -105,14 +105,14 @@ def _PossibleReportFiles(): ...@@ -105,14 +105,14 @@ def _PossibleReportFiles():
def _SetPushedReports(directory): def _SetPushedReports(directory):
outpath = os.path.join(directory, 'milestones.json') outpath = os.path.join(directory, 'milestones.json')
with codecs.open(outpath, 'w', encoding='ascii') as out_file: with codecs.open(outpath, 'w', encoding='ascii') as out_file:
json.dump(out_file, { pushed_reports_obj = {
'pushed': { 'pushed': {
'cpu': DESIRED_CPUS, 'cpu': DESIRED_CPUS,
'apk': DESIRED_APKS, 'apk': DESIRED_APKS,
'version': DESIRED_VERSION, 'version': DESIRED_VERSION,
}, },
}) }
json.dump(pushed_reports_obj, out_file)
def _GetReportPaths(directory, template, report): def _GetReportPaths(directory, template, report):
report_dict = report._asdict() report_dict = report._asdict()
...@@ -194,7 +194,7 @@ def main(): ...@@ -194,7 +194,7 @@ def main():
format='%(levelname).1s %(relativeCreated)6d %(message)s') format='%(levelname).1s %(relativeCreated)6d %(message)s')
size_file_bucket = args.size_file_bucket size_file_bucket = args.size_file_bucket
if not size_file_bucket.startwith('gs://'): if not size_file_bucket.startswith('gs://'):
parser.error('Size file bucket must be located in Google Cloud Storage.') parser.error('Size file bucket must be located in Google Cloud Storage.')
elif size_file_bucket.endswith('/'): elif size_file_bucket.endswith('/'):
# Remove trailing slash # Remove trailing slash
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment