Skip to content
Myr

raise_for_status is better

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent ce122cc · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:requests/core.py+1 added-1 removed
266 unmodified lines
267 def __nonzero__(self):268 """Returns true if status_code is 'OK'."""269 return not self.error270 271 def raise_for_response(self):271 def raise_for_status(self):272 """Raises stored HTTPError if one exists."""273 if self.error:274 raise self.error275
196 unmodified lines