def fetch_try_jobs(auth_config, changelist, options):
    'Fetches tryjobs from buildbucket.\n\n  Returns a map from build id to build info as json dictionary.\n  '
    rietveld_url = settings.GetDefaultServerUrl()
    rietveld_host = urlparse.urlparse(rietveld_url).hostname
    authenticator = auth.get_authenticator_for_host(rietveld_host, auth_config)
    if authenticator.has_cached_credentials():
        http = authenticator.authorize(httplib2.Http())
    else:
        print(('Warning: Some results might be missing because %s' % (auth.LoginRequiredError(rietveld_host).message,)))
        http = httplib2.Http()
    http.force_exception_to_status_code = True
    buildset = 'patch/rietveld/{hostname}/{issue}/{patch}'.format(hostname=rietveld_host, issue=changelist.GetIssue(), patch=options.patchset)
    params = {'tag': ('buildset:%s' % buildset)}
    builds = {}
    while True:
        url = 'https://{hostname}/_ah/api/buildbucket/v1/search?{params}'.format(hostname=options.buildbucket_host, params=urllib.urlencode(params))
        content = _buildbucket_retry('fetching tryjobs', http, url, 'GET')
        for build in content.get('builds', []):
            builds[build['id']] = build
        if ('next_cursor' in content):
            params['start_cursor'] = content['next_cursor']
        else:
            break
    return builds
Fetches tryjobs from buildbucket.

Returns a map from build id to build info as json dictionary.
def fetch_try_jobs(auth_config, changelist, options):
    'Fetches tryjobs from buildbucket.\n\n  Returns a map from build id to build info as json dictionary.\n  '
    rietveld_url = settings.GetDefaultServerUrl()
    rietveld_host = urlparse.urlparse(rietveld_url).hostname
    authenticator = auth.get_authenticator_for_host(rietveld_host, auth_config)
    if authenticator.has_cached_credentials():
        http = authenticator.authorize(httplib2.Http())
    else:
        print(('Warning: Some results might be missing because %s' % (auth.LoginRequiredError(rietveld_host).message,)))
        http = httplib2.Http()
    http.force_exception_to_status_code = True
    buildset = 'patch/rietveld/{hostname}/{issue}/{patch}'.format(hostname=rietveld_host, issue=changelist.GetIssue(), patch=options.patchset)
    params = {'tag': ('buildset:%s' % buildset)}
    builds = {}
    while True:
        url = 'https://{hostname}/_ah/api/buildbucket/v1/search?{params}'.format(hostname=options.buildbucket_host, params=urllib.urlencode(params))
        content = _buildbucket_retry('fetching tryjobs', http, url, 'GET')
        for build in content.get('builds', []):
            builds[build['id']] = build
        if ('next_cursor' in content):
            params['start_cursor'] = content['next_cursor']
        else:
            break
    return builds