#NEWLINE# def parse_error( self ) : #NEWLINE# #INDENT# if ( body . status == 401 ) : #NEWLINE# #INDENT# raise InvalidCredsError ( self . body ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# body = ET . XML ( self . body ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# raise MalformedResponseError ( 'Failed to parse XML' , body = self . body , driver = SlicehostNodeDriver ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# return '; ' . join ( [ err . text for err in body . findall ( 'error' ) ] ) #NEWLINE# #UNINDENT# except ExpatError : #NEWLINE# #INDENT# return self . body