#NEWLINE# def store_failure( self , artifact_name , exc_info ) : #NEWLINE# #INDENT# 'Stores a failure from an exception info tuple.' #NEWLINE# fn = self . get_filename ( artifact_name ) #NEWLINE# try : #NEWLINE# #INDENT# os . makedirs ( os . path . dirname ( fn ) ) #NEWLINE# #UNINDENT# except OSError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# with open ( fn , 'wb' ) as f : #NEWLINE# #INDENT# json . dump ( BuildFailure . from_exc_info ( artifact_name , exc_info ) . to_json ( ) , f ) #NEWLINE# f . write ( '\n' )