| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 sys | 7 import sys |
| 8 import time | 8 import time |
| 9 | 9 |
| 10 from infra.ext import requests | 10 import requests |
| 11 | 11 |
| 12 | 12 |
| 13 def get_builders(json_base): | 13 def get_builders(json_base): |
| 14 return requests.get( | 14 return requests.get( |
| 15 'https://%s/json/builders?filter=False' % json_base).json().keys() | 15 'https://%s/json/builders?filter=False' % json_base).json().keys() |
| 16 | 16 |
| 17 | 17 |
| 18 def get_builder(json_base, builder): | 18 def get_builder(json_base, builder): |
| 19 return requests.get( | 19 return requests.get( |
| 20 'https://%s/json/builders/%s?filter=False' % (json_base, builder)).json() | 20 'https://%s/json/builders/%s?filter=False' % (json_base, builder)).json() |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 cmd_parser_current.add_argument('--blame', action='store_true') | 81 cmd_parser_current.add_argument('--blame', action='store_true') |
| 82 | 82 |
| 83 args = parser.parse_args(argv) | 83 args = parser.parse_args(argv) |
| 84 | 84 |
| 85 # Dispatch to the function set for target subparser using set_defaults. | 85 # Dispatch to the function set for target subparser using set_defaults. |
| 86 return args.func(args) | 86 return args.func(args) |
| 87 | 87 |
| 88 | 88 |
| 89 if __name__ == '__main__': | 89 if __name__ == '__main__': |
| 90 sys.exit(main(sys.argv[1:])) | 90 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |