[common] allow request() to accept all HTTP status codes
by passing Ellipsis/... as 'fatal' argument
This commit is contained in:
@@ -185,7 +185,9 @@ class Extractor():
|
|||||||
self._dump_response(response)
|
self._dump_response(response)
|
||||||
if (
|
if (
|
||||||
code < 400 or
|
code < 400 or
|
||||||
code < 500 and (not fatal and code != 429 or fatal is None)
|
code < 500 and (
|
||||||
|
not fatal and code != 429 or fatal is None) or
|
||||||
|
fatal is ...
|
||||||
):
|
):
|
||||||
if encoding:
|
if encoding:
|
||||||
response.encoding = encoding
|
response.encoding = encoding
|
||||||
|
|||||||
Reference in New Issue
Block a user