tools/mac/download_symbols.py
def _identify_channel(version, arch):
    """Attempts to guess the release channel given a Chrome version and CPU
    architecture."""
    # First try querying OmahaProxy for the release.
    with request.urlopen(_OMAHAPROXY_HISTORY) as release_history:
        history = csv.DictReader(
            release_history.read().decode('utf8').split('\n'))
        for row in history:
            if row['version'] == version:
                return row['channel']

    # Fall back to sending HEAD HTTP requests to each of the possible symbol
    # locations.
    print(
        'Unable to identify release channel for {}, now brute-force searching'.
        format(version),
        file=sys.stderr)
    for channel in ('stable', 'beta', 'dev', 'canary'):
        url, _ = _get_url_and_dest(version, channel, arch, '')
        req = request.Request(url, method='HEAD')
        try:
            resp = request.urlopen(req)
            if resp.code == 200:
                return channel
        except:
            continue

    return None
Attempts to guess the release channel given a Chrome version and CPU
    architecture.
Attempts to guess the release channel given a Chrome version and CPU
architecture.
Attempts to guess the release channel given a Chrome version and CPU architecture .
def _identify_channel(version, arch):
    with request.urlopen(_OMAHAPROXY_HISTORY) as release_history:
        history = csv.DictReader(
            release_history.read().decode('utf8').split('\n'))
        for row in history:
            if row['version'] == version:
                return row['channel']
    print(
        'Unable to identify release channel for {}, now brute-force searching'.
        format(version),
        file=sys.stderr)
    for channel in ('stable', 'beta', 'dev', 'canary'):
        url, _ = _get_url_and_dest(version, channel, arch, '')
        req = request.Request(url, method='HEAD')
        try:
            resp = request.urlopen(req)
            if resp.code == 200:
                return channel
        except:
            continue
    return None
def _identify_channel ( version , arch ) : with request . urlopen ( _OMAHAPROXY_HISTORY ) as release_history : history = csv . DictReader ( release_history . read ( ) . decode ( 'utf8' ) . split ( '\n' ) ) for row in history : if row [ 'version' ] == version : return row [ 'channel' ] print ( 'Unable to identify release channel for {}, now brute-force searching' . format ( version ) , file = sys . stderr ) for channel in ( 'stable' , 'beta' , 'dev' , 'canary' ) : url , _ = _get_url_and_dest ( version , channel , arch , '' ) req = request . Request ( url , method = 'HEAD' ) try : resp = request . urlopen ( req ) if resp . code == 200 : return channel except : continue return None
Attempts to guess the release channel given a Chrome version and CPU
architecture.
Attempts to guess the release channel given a Chrome version and CPU architecture .
"""Attempts to guess the release channel given a Chrome version and CPU
    architecture.""" # First try querying OmahaProxy for the release. # Fall back to sending HEAD HTTP requests to each of the possible symbol # locations.
version
arch