#NEWLINE# def geocode_one( self , location ) : #NEWLINE# #INDENT# results = self . geocode ( location ) #NEWLINE# first = None #NEWLINE# for result in results : #NEWLINE# #INDENT# if ( first is None ) : #NEWLINE# #INDENT# first = result #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise GeocoderResultError ( 'Geocoder returned more than one result!' ) #NEWLINE# #UNINDENT# #UNINDENT# if ( self is not None ) : #NEWLINE# #INDENT# return first #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise GeocoderResultError ( 'Geocoder returned no results!' )