def parseErrorAndResponse(self, data):
        """Parse returned XML for errors, then convert into
        appropriate Python objects."""

        xml = fromstring(data)
        error = xml.find('.//ERROR')

        if error is None:
            self.deferred.callback(self.parseResponse(xml))
            return

        try:
            code = int(error.attrib['CODE'])
        except ValueError:
            code = 0

        self.deferred.errback(CIMError(code, error.attrib['DESCRIPTION']))
def parseErrorAndResponse ( self , data ) : xml = fromstring ( data ) error = xml . find ( './/ERROR' ) if error is None : self . deferred . callback ( self . parseResponse ( xml ) ) return try : code = int ( error . attrib [ 'CODE' ] ) except ValueError : code = 0 self . deferred . errback ( CIMError ( code , error . attrib [ 'DESCRIPTION' ] ) )
Parse returned XML for errors, then convert into
        appropriate Python objects.