replace extractor.request() 'expect' argument

with
- 'fatal': allow 4xx status codes
- 'notfound': raise NotFoundError on 404
This commit is contained in:
Mike Fährmann
2019-07-04 23:45:26 +02:00
parent 2ff73873f0
commit fdec59f8e2
16 changed files with 51 additions and 84 deletions

View File

@@ -126,7 +126,7 @@ class OAuth1API():
self.session = extractor.session
self.api_key = api_key
def request(self, url, method="GET", *, expect=range(400, 500), **kwargs):
kwargs["expect"] = expect
def request(self, url, method="GET", **kwargs):
kwargs["fatal"] = False
kwargs["session"] = self.session
return self.extractor.request(url, method, **kwargs)