#NEWLINE# def raise_for_status( self , resp ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# resp . raise_for_status ( ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# if ( payload . headers [ 'content-type' ] == 'application/json' ) : #NEWLINE# #INDENT# payload = resp . json ( ) #NEWLINE# if ( payload [ 'kind' ] == 'Status' ) : #NEWLINE# #INDENT# raise HTTPError ( payload [ 'message' ] ) #NEWLINE# #UNINDENT# #UNINDENT# raise