def add_milestones_with_no_issues(milestones):
    output = milestones.copy()
    resp = requests.get(c.get_milestone_url(v._CONFIG_), auth=c.get_basic_auth_credentials(v._CONFIG_))
    if resp.status_code == 200:
        empty_milestones = [m for m in simplejson.loads(resp.content) if m['open_issues'] == 0]
        for ms in empty_milestones:
            output[(ms['number'], ms['title'], ms['description'], ms['due_on'])] = []
    else:
        print 'Unexpected reponse'
    return output
def add_milestones_with_no_issues(milestones):
    output = milestones.copy()
    resp = requests.get(c.get_milestone_url(v._CONFIG_),
                        auth=c.get_basic_auth_credentials(v._CONFIG_))
    if resp.status_code == 200:
        empty_milestones = [
            m for m in simplejson.loads(resp.content) if m['open_issues'] == 0
        ]
        for ms in empty_milestones:
            output[(ms['number'], ms['title'], ms['description'],
                    ms['due_on'])] = []
    else:
        print 'Unexpected reponse'
    return output
def main2():
    try:
        c.setup('roadmap.md')
        resp = requests.get(c.get_milestone_url(v._CONFIG_), auth=c.get_basic_auth_credentials(v._CONFIG_))
        if resp.status_code == 200:
            fmt.h1('Technology Roadmap')
            milestones = simplejson.loads(resp.content)
            for milestone in milestones:
                write_milestone(milestone)
            print 'Done.'
        else:
            print 'Unexpected reponse'
            print 'Status: %s' % resp.status_code
    finally:
        c.teardown()
def main2():
    try:
        c.setup('roadmap.md')
        resp = requests.get(c.get_milestone_url(v._CONFIG_),
                            auth=c.get_basic_auth_credentials(v._CONFIG_))
        if resp.status_code == 200:
            fmt.h1('Technology Roadmap')
            milestones = simplejson.loads(resp.content)
            for milestone in milestones:
                write_milestone(milestone)
            print 'Done.'
        else:
            print 'Unexpected reponse'
            print 'Status: %s' % resp.status_code
    finally:
        c.teardown()