scripts/update-lists.py
def update_file(url, filename):
    """Update the content of a single file."""
    resp = urlopen(url)
    if resp.code != 200:
        raise Exception('GET {} failed.'.format(url))
    with open(_get_package_path(filename), 'w') as fp:
        for l in resp:
            if not l.startswith(b'#'):
                fp.write(l.decode('utf8'))
    print('Updated {}'.format(filename))
def update_file(url, filename):
    """Update the content of a single file."""
    resp = urlopen(url)
    if resp.code != 200:
        raise Exception('GET {} failed.'.format(url))
    with open(_get_package_path(filename), 'w') as fp:
        for l in resp:
            if not l.startswith(b'#'):
                fp.write(l.decode('utf8'))
    print('Updated {}'.format(filename))
def update_file ( url , filename ) : resp = urlopen ( url ) if resp . code != 200 : raise Exception ( 'GET {} failed.' . format ( url ) ) with open ( _get_package_path ( filename ) , 'w' ) as fp : for l in resp : if not l . startswith ( b'#' ) : fp . write ( l . decode ( 'utf8' ) ) print ( 'Updated {}' . format ( filename ) )
Update the content of a single file.
Update the content of a single file .