#NEWLINE# def get_instance_error( instance ) : #NEWLINE# #INDENT# if ( instance . status . lower ( ) != 'error' ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# message = instance_fault_to_friendly_message ( instance ) #NEWLINE# preamble = ( ( _ ( 'Failed to launch instance "%s"' ) % instance . name ) or instance . id ) #NEWLINE# message = string_concat ( preamble , ': ' , message ) #NEWLINE# return message