Chromium Code Reviews| Index: scripts/master/buildbucket/client.py |
| diff --git a/scripts/master/buildbucket/client.py b/scripts/master/buildbucket/client.py |
| index 7db82ce711c4128c27548af781272cae71c033d5..2c882ac014d48a5c12b0993f02fd3cc2bcf200e0 100644 |
| --- a/scripts/master/buildbucket/client.py |
| +++ b/scripts/master/buildbucket/client.py |
| @@ -25,6 +25,13 @@ def buildbucket_api_discovery_url(hostname=None): |
| return ( |
| 'https://%s/_ah/api/discovery/v1/apis/{api}/{apiVersion}/rest' % hostname) |
| + |
| +def get_default_buildbucktet_hostname(master): |
|
ghost stip (do not use)
2015/03/04 23:07:30
get_default_buildbucket_hostname
nodir
2015/03/04 23:52:09
Done
|
| + return ( |
| + BUILDBUCKET_HOSTNAME_PRODUCTION if master.is_production_host |
| + else BUILDBUCKET_HOSTNAME_TESTING) |
|
ghost stip (do not use)
2015/03/04 23:07:30
what happens when a master is started as part of m
nodir
2015/03/04 23:52:10
Tests don't fail: before it reaches this point, it
|
| + |
| + |
| def create_buildbucket_service( |
| master, hostname=None, verbose=None): |
| """Asynchronously creates buildbucket API resource. |
| @@ -32,9 +39,7 @@ def create_buildbucket_service( |
| Returns: |
| A DeferredResource as Deferred. |
| """ |
| - hostname = hostname or ( |
| - BUILDBUCKET_HOSTNAME_PRODUCTION if master.is_production_host |
| - else BUILDBUCKET_HOSTNAME_TESTING) |
| + hostname = hostname or get_default_buildbucktet_hostname(master) |
|
ghost stip (do not use)
2015/03/04 23:07:30
same here
nodir
2015/03/04 23:52:10
Thanks
|
| return DeferredResource.build( |
| 'buildbucket', |
| 'v1', |