

def _generate_county_filename(self, election):
    bits = [election['start_date'].replace('-', ''), self.state]
    if election['special']:
        bits.append('special')
    bits.extend([election['race_type'].replace('-', '_').lower()])
    filename = ('__'.join(bits) + '.xml')
    return filename

dataset/ETHPy150Open openelections/openelections-core/openelex/us/sc/datasource.py Datasource._generate_county_filename/original