Skip to content

Commit 79b311c

Browse files
authored
Merge branch 'main' into api-template
2 parents b82a9c7 + 3b3ea6d commit 79b311c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

vulnerabilities/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from collections import defaultdict
2020
from functools import total_ordering
2121
from hashlib import sha256
22+
from http import HTTPStatus
2223
from typing import List
2324
from typing import Optional
2425
from typing import Tuple
@@ -420,7 +421,7 @@ def fetch_response(url):
420421
Fetch and return `response` from the `url`
421422
"""
422423
response = requests.get(url)
423-
if response.status_code == 200:
424+
if response.status_code == HTTPStatus.OK:
424425
return response
425426
raise Exception(f"Failed to fetch data from {url!r} with status code: {response.status_code!r}")
426427

0 commit comments

Comments
 (0)