Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/requests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,11 +760,7 @@ def ok(self):
the status code is between 200 and 400, this will return True. This
is **not** a check to see if the response code is ``200 OK``.
"""
try:
self.raise_for_status()
except HTTPError:
return False
return True
return self.status_code < 400

@property
def is_redirect(self):
Expand Down