def _save_config(jira_url, username, password, error_reporting):
    """
    Saves the username and password to the config
    """
    # Delete what is there before we re-write. New user means new everything
    os.path.exists(_config) and os.remove(_config)

    config = ConfigParser.SafeConfigParser()
    config.read(_config)
    if not config.has_section('jira'):
        config.add_section('jira')

    if 'http' not in jira_url:
        jira_url = 'http://' + jira_url

    try:
        resp = urllib.urlopen(jira_url)
        url = urlparse.urlparse(resp.url)
        jira_url = url.scheme + "://" + url.netloc
    except IOError, e:
        print "It doesn't appear that {0} is responding to a request.\
               Please make sure that you typed the hostname, \
               i.e. jira.atlassian.com.\n{1}".format(jira_url, e)
        sys.exit(1)

    config.set('jira', 'url', jira_url)
    config.set('jira', 'username', username)
    config.set('jira', 'password', base64.b64encode(password))
    config.set('jira', 'error_reporting', str(error_reporting))

    with open(_config, 'w') as ini:
        os.chmod(_config, 0600)
        config.write(ini)
Saves the username and password to the config