def _process_request_result(self, res):
if res.status_code < <NUM_LIT:200> or res.status_code >= <NUM_LIT>:<EOL><INDENT>if res.status_code == <NUM_LIT>:<EOL><INDENT>return []<EOL><DEDENT>elif res.status_code == <NUM_LIT>:<EOL><INDENT>raise Unacceptable(res, None)<EOL><DEDENT>raise ForemanException(<EOL>res,<EOL>'<STR_LIT>' % res_to_str(res)<EOL>)<EOL><DEDENT>try:<EOL><INDENT>return OLD_REQ and res.json or res.json()<EOL><DEDENT>except ValueError:<EOL><INDENT>return res.text<EOL><DEDENT>
Generic function to process the result of an HTTP request