#NEWLINE# @ classmethod #NEWLINE# def _replace( cls , args ) : #NEWLINE# #INDENT# api . _timeout = args . timeout #NEWLINE# format = args . format #NEWLINE# res = api . Tag . update ( args . host , tags = args . tag ) #NEWLINE# report_warnings ( res ) #NEWLINE# report_errors ( format ) #NEWLINE# if ( format == 'pretty' ) : #NEWLINE# #INDENT# print ( ( "Tags for '%s':" % res [ 'host' ] ) ) #NEWLINE# for c in res [ 'tags' ] : #NEWLINE# #INDENT# print ( ( '  ' + c ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( format == 'raw' ) : #NEWLINE# #INDENT# print ( json . dumps ( res ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# for c in res [ 'tags' ] : #NEWLINE# #INDENT# print ( c )