We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c311f73 + 17de178 commit 3b3ea6dCopy full SHA for 3b3ea6d
vulnerabilities/utils.py
@@ -19,6 +19,7 @@
19
from collections import defaultdict
20
from functools import total_ordering
21
from hashlib import sha256
22
+from http import HTTPStatus
23
from typing import List
24
from typing import Optional
25
from typing import Tuple
@@ -420,7 +421,7 @@ def fetch_response(url):
420
421
Fetch and return `response` from the `url`
422
"""
423
response = requests.get(url)
- if response.status_code == 200:
424
+ if response.status_code == HTTPStatus.OK:
425
return response
426
raise Exception(f"Failed to fetch data from {url!r} with status code: {response.status_code!r}")
427
0 commit comments