Returns a dictionary of important dates

def important_dates(year):
    """Returns a dictionary of important dates"""
    output = {}
    data = mlbgame.data.get_important_dates(year)
    important_dates = etree.parse(data).getroot().\
        find('queryResults').find('row')
    try:
        for x in important_dates.attrib:
            output[x] = important_dates.attrib[x]
    except AttributeError:
        raise ValueError('Unable to find important dates for {}.'.format(year))
    return output