Skip to content

Commit

Permalink
Merge pull request #1450 from thebigbone/main
Browse files Browse the repository at this point in the history
use https.ok from HTTP package
  • Loading branch information
pombredanne authored Jul 16, 2024
2 parents c311f73 + 17de178 commit 3b3ea6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vulnerabilities/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from collections import defaultdict
from functools import total_ordering
from hashlib import sha256
from http import HTTPStatus
from typing import List
from typing import Optional
from typing import Tuple
Expand Down Expand Up @@ -420,7 +421,7 @@ def fetch_response(url):
Fetch and return `response` from the `url`
"""
response = requests.get(url)
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
return response
raise Exception(f"Failed to fetch data from {url!r} with status code: {response.status_code!r}")

Expand Down

0 comments on commit 3b3ea6d

Please sign in to comment.