#NEWLINE# def __init__( self , response ) : #NEWLINE# #INDENT# self . body = response . read ( ) #NEWLINE# self . status = response . status #NEWLINE# self . headers = dict ( response . getheaders ( ) ) #NEWLINE# self . error = response . reason #NEWLINE# self . invalid = LinodeException ( 255 , 'Invalid JSON received from server' ) #NEWLINE# ( self . action , self . object , self . errors ) = self . parse_body ( ) #NEWLINE# if ( self . error == 'Moved Temporarily' ) : #NEWLINE# #INDENT# raise LinodeException ( 250 , 'Redirected to error page by API.  Bug?' ) #NEWLINE# #UNINDENT# if ( not self . success ( ) ) : #NEWLINE# #INDENT# raise self . errors [ 0 ]