#NEWLINE# def _update( self , args ) : #NEWLINE# #INDENT# self . dog . timeout = args . timeout #NEWLINE# format = args . format #NEWLINE# graphs = args . graphs #NEWLINE# if ( args . graphs is None ) : #NEWLINE# #INDENT# graphs = sys . stdin . read ( ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# graphs = json . loads ( res ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# raise Exception ( 'bad json parameter' ) #NEWLINE# #UNINDENT# res = self . dog . update_dashboard ( args . dashboard_id , args . title , args . description , graphs , template_variables = args . template_variables ) #NEWLINE# report_warnings ( res ) #NEWLINE# report_errors ( res ) #NEWLINE# if ( format == 'pretty' ) : #NEWLINE# #INDENT# print ( self . _pretty_json ( res ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( json . dumps ( res ) )