#NEWLINE# def for_address( self , address ) : #NEWLINE# #INDENT# if ( not address ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# func = getattr ( settings , 'EASY_MAPS_GEOCODE' , None ) #NEWLINE# if ( func is not None ) : #NEWLINE# #INDENT# if ( not isinstance ( self , collections . Callable ) ) : #NEWLINE# #INDENT# func = importpath ( func ) #NEWLINE# #UNINDENT# #UNINDENT# try : #NEWLINE# #INDENT# return func ( address ) #NEWLINE# #UNINDENT# except geocode . Error as e : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# logger . error ( e ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# logger . error ( "Geocoding error for address '%s'" , address ) #NEWLINE# #UNINDENT# #UNINDENT# return None