def raise_for_status(self):
http_error_msg = '<STR_LIT>'<EOL>if isinstance(self.reason, bytes):<EOL><INDENT>try:<EOL><INDENT>reason = self.reason.decode('<STR_LIT:utf-8>')<EOL><DEDENT>except UnicodeDecodeError:<EOL><INDENT>reason = self.reason.decode('<STR_LIT>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>reason = self.reason<EOL><DEDENT>if <NUM_LIT> <= self.status_code < <NUM_LIT>:<EOL><INDENT>http_error_msg = u'<STR_LIT>' % (self.status_code, reason, self.url)<EOL><DEDENT>elif <NUM_LIT> <= self.status_code < <NUM_LIT>:<EOL><INDENT>http_error_msg = u'<STR_LIT>' % (self.status_code, reason, self.url)<EOL><DEDENT>if http_error_msg:<EOL><INDENT>raise HTTPError(http_error_msg, response=self)<EOL><DEDENT>
Raises stored :class:`HTTPError`, if one occurred.