| OLD | NEW |
| 1 #!/usr/bin/env python2 | 1 #!/usr/bin/env python2 |
| 2 # -*- coding: utf-8 -*- | 2 # -*- coding: utf-8 -*- |
| 3 | 3 |
| 4 # Copyright 2015 Google Inc. All Rights Reserved. | 4 # Copyright 2015 Google Inc. All Rights Reserved. |
| 5 # | 5 # |
| 6 # Licensed under the Apache License, Version 2.0 (the "License"); | 6 # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 # you may not use this file except in compliance with the License. | 7 # you may not use this file except in compliance with the License. |
| 8 # You may obtain a copy of the License at | 8 # You may obtain a copy of the License at |
| 9 # | 9 # |
| 10 # http://www.apache.org/licenses/LICENSE-2.0 | 10 # http://www.apache.org/licenses/LICENSE-2.0 |
| (...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 for api, manifest in polyfill_manifests.iteritems(): | 748 for api, manifest in polyfill_manifests.iteritems(): |
| 749 if (manifest['status'] != 'total' and | 749 if (manifest['status'] != 'total' and |
| 750 api not in {'app.window', 'app.runtime'}): | 750 api not in {'app.window', 'app.runtime'}): |
| 751 status = 'partial' | 751 status = 'partial' |
| 752 break | 752 break |
| 753 # TODO(alger): Detect fatal errors which would give a none status. | 753 # TODO(alger): Detect fatal errors which would give a none status. |
| 754 | 754 |
| 755 # Finally, generate and write a conversion report. | 755 # Finally, generate and write a conversion report. |
| 756 abs_report_dir = os.path.join(output_dir, report_dir) | 756 abs_report_dir = os.path.join(output_dir, report_dir) |
| 757 report.generate_and_write(abs_report_dir, chrome_app_manifest, | 757 report.generate_and_write(abs_report_dir, chrome_app_manifest, |
| 758 polyfill_manifests, status, captured_warnings, output_dir) | 758 polyfill_manifests, status, captured_warnings, output_dir, |
| 759 boilerplate_dir) |
| 759 | 760 |
| 760 logging.info('Done.') | 761 logging.info('Done.') |
| 761 | 762 |
| 762 | 763 |
| 763 class Formatter(logging.Formatter): | 764 class Formatter(logging.Formatter): |
| 764 """Caterpillar logging formatter. | 765 """Caterpillar logging formatter. |
| 765 | 766 |
| 766 Adds color to the logged information. | 767 Adds color to the logged information. |
| 767 """ | 768 """ |
| 768 | 769 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 configuration.generate_and_save(args.output, args.interactive) | 855 configuration.generate_and_save(args.output, args.interactive) |
| 855 | 856 |
| 856 elif args.mode == 'convert': | 857 elif args.mode == 'convert': |
| 857 config = configuration.load(args.config) | 858 config = configuration.load(args.config) |
| 858 convert_app(args.input, args.output, config, handler.captured_warnings, | 859 convert_app(args.input, args.output, config, handler.captured_warnings, |
| 859 args.force) | 860 args.force) |
| 860 | 861 |
| 861 | 862 |
| 862 if __name__ == '__main__': | 863 if __name__ == '__main__': |
| 863 sys.exit(main()) | 864 sys.exit(main()) |
| OLD | NEW |