diff options
| author | 2018-10-30 17:49:35 +0000 | |
|---|---|---|
| committer | 2018-10-30 17:49:35 +0000 | |
| commit | b543e31cd2a665b25aab4554e46a0ed5067d1bfe (patch) | |
| tree | 285e0b52f45e167dbc381951482c7bff660c6630 /src/utils/http.py | |
| parent | Typo in src/Exports; 'self_exports' -> 'self.exports' (diff) | |
Fix/refactor issues brought up by type hint linting
Diffstat (limited to 'src/utils/http.py')
| -rw-r--r-- | src/utils/http.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/http.py b/src/utils/http.py index b949e9ff..8856cd43 100644 --- a/src/utils/http.py +++ b/src/utils/http.py @@ -8,7 +8,7 @@ REGEX_HTTP = re.compile("https?://", re.I) RESPONSE_MAX = (1024*1024)*100 -class HTTPException: +class HTTPException(Exception): pass class HTTPTimeoutException(HTTPException): pass @@ -52,7 +52,7 @@ def get_url(url: str, method: str="GET", get_params: dict={}, if soup: soup = bs4.BeautifulSoup(response_content, parser) if code: - return response.code, soup + return response.status_code, soup return soup data = response_content.decode(response.encoding or fallback_encoding) |
