(self, resp)
return u.close()
Parse the xmlrpc response.
Parse the xmlrpc response.
Parse the xmlrpc response .
def parse_response(self, resp):
        """
        Parse the xmlrpc response.
        """
        p, u = self.getparser()

        if hasattr(resp, 'text'):
            # modern requests will do this for us
            text = resp.text  # this is unicode(py2)/str(py3)
        else:

            encoding = requests.utils.get_encoding_from_headers(resp.headers)
            if encoding is None:
                encoding = 'utf-8'  # FIXME: what to do here?

            if sys.version_info[0] == 2:
                text = unicode(  # noqa: F821
                    resp.content, encoding, errors='replace')
            else:
                assert sys.version_info[0] == 3
                text = str(resp.content, encoding, errors='replace')
        p.feed(text)
        p.close()
        return u.close()
def parse_response ( self , resp ) : p , u = self . getparser ( ) if hasattr ( resp , 'text' ) : # modern requests will do this for us text = resp . text # this is unicode(py2)/str(py3) else : encoding = requests . utils . get_encoding_from_headers ( resp . headers ) if encoding is None : encoding = 'utf-8' # FIXME: what to do here? if sys . version_info [ 0 ] == 2 : text = unicode ( # noqa: F821 resp . content , encoding , errors = 'replace' ) else : assert sys . version_info [ 0 ] == 3 text = str ( resp . content , encoding , errors = 'replace' ) p . feed ( text ) p . close ( ) return u . close ( )