#NEWLINE# def _url_paths_for_election( self , election , filename = None ) : #NEWLINE# #INDENT# '\n        Retrieve URL metadata entries for a single election.\n\n        Args:\n            election: Election metadata dictionary as returned by the\n            elections() method or string containing an election slug.\n\n        Returns:\n            A list of dictionaries, like the return value of\n            ``_url_paths()``.\n\n        ' #NEWLINE# try : #NEWLINE# #INDENT# slug = election [ 'slug' ] #NEWLINE# #UNINDENT# except TypeError : #NEWLINE# #INDENT# slug = election #NEWLINE# #UNINDENT# return [ election for p in self . _url_paths ( filename ) if ( p [ 'election_slug' ] == slug ) ]