OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import argparse | 6 import argparse |
7 import codecs | 7 import codecs |
8 import json | 8 import json |
9 import sys | 9 import sys |
10 import os | 10 import os |
(...skipping 23 matching lines...) Expand all Loading... |
34 for html_path in args.html: | 34 for html_path in args.html: |
35 histograms.extend(results_renderer.ReadExistingResults( | 35 histograms.extend(results_renderer.ReadExistingResults( |
36 open(html_path, 'r'))) | 36 open(html_path, 'r'))) |
37 | 37 |
38 for json_path in args.json: | 38 for json_path in args.json: |
39 histograms.extend(json.load(open(json_path, 'r'))) | 39 histograms.extend(json.load(open(json_path, 'r'))) |
40 | 40 |
41 open(args.html_path, 'a').close() # Create file if it doesn't exist. | 41 open(args.html_path, 'a').close() # Create file if it doesn't exist. |
42 with codecs.open(args.html_path, | 42 with codecs.open(args.html_path, |
43 mode='r+', encoding='utf-8') as output_stream: | 43 mode='r+', encoding='utf-8') as output_stream: |
44 results_renderer.RenderHTMLView(histograms, output_stream) | 44 results_renderer.RenderHTMLView(histograms, [], output_stream) |
45 | 45 |
46 if __name__ == '__main__': | 46 if __name__ == '__main__': |
47 sys.exit(main()) | 47 sys.exit(main()) |
OLD | NEW |