def parse_response(self, resp):
p, u = self.getparser()<EOL>if hasattr(resp,'<STR_LIT:text>'):<EOL><INDENT>text = resp.text <EOL><DEDENT>else:<EOL><INDENT>encoding = requests.utils.get_encoding_from_headers(resp.headers)<EOL>if encoding is None:<EOL><INDENT>encoding='<STR_LIT:utf-8>' <EOL><DEDENT>if sys.version_info[<NUM_LIT:0>]==<NUM_LIT:2>:<EOL><INDENT>text = unicode(resp.content, encoding, errors='<STR_LIT:replace>')<EOL><DEDENT>else:<EOL><INDENT>assert sys.version_info[<NUM_LIT:0>]==<NUM_LIT:3><EOL>text = str(resp.content, encoding, errors='<STR_LIT:replace>')<EOL><DEDENT><DEDENT>p.feed(text)<EOL>p.close()<EOL>return u.close()<EOL>
Parse the xmlrpc response.