bin/workshops.py
def fetch(url):
    '''Fetch information from a single online repository.'''
    url = url.replace('github.com', 'raw.github.com') + '/gh-pages/index.html'
    response = requests.get(url)
    if response.status_code != 200:
        fail('Request for {0} returned status code {1}', url, response.status_code)
    pieces = response.text.split('---')
    if len(pieces) < 2:
        fail('Malformed YAML header in {0}', url)
    try:
        info = yaml.load(pieces[1])
    except Exception as e:
        fail('Unable to parse YAML for {0}: {1}'.format(url, str(e)))
        raise e
    return info
Fetch information from a single online repository.
Fetch information from a single online repository.
Fetch information from a single online repository .
def fetch(url):
    url = url.replace('github.com', 'raw.github.com') + '/gh-pages/index.html'
    response = requests.get(url)
    if response.status_code != 200:
        fail('Request for {0} returned status code {1}', url, response.status_code)
    pieces = response.text.split('---')
    if len(pieces) < 2:
        fail('Malformed YAML header in {0}', url)
    try:
        info = yaml.load(pieces[1])
    except Exception as e:
        fail('Unable to parse YAML for {0}: {1}'.format(url, str(e)))
        raise e
    return info
def fetch ( url ) : url = url . replace ( 'github.com' , 'raw.github.com' ) + '/gh-pages/index.html' response = requests . get ( url ) if response . status_code != 200 : fail ( 'Request for {0} returned status code {1}' , url , response . status_code ) pieces = response . text . split ( '---' ) if len ( pieces ) < 2 : fail ( 'Malformed YAML header in {0}' , url ) try : info = yaml . load ( pieces [ 1 ] ) except Exception as e : fail ( 'Unable to parse YAML for {0}: {1}' . format ( url , str ( e ) ) ) raise e return info
Fetch information from a single online repository.
Fetch information from a single online repository .
'''Fetch information from a single online repository.'''
url