#NEWLINE# def _generate( self , fail_on_error = True ) : #NEWLINE# #INDENT# return_code = cli . generate ( ) #NEWLINE# sys . stdout . seek ( 0 ) #NEWLINE# out = '\n' . join ( [ line for line in sys . stdout . readlines ( ) ] ) #NEWLINE# if ( return_code != 0 ) : #NEWLINE# #INDENT# if fail_on_error : #NEWLINE# #INDENT# self . fail ( 'generate failed, stdout dump follows:\n{0}' . format ( out ) ) #NEWLINE# #UNINDENT# #UNINDENT# return self