Skip to content

Commit

Permalink
Fix typos in two variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
dav3r committed Oct 11, 2024
1 parent 63aa071 commit caa2d26
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/cyhy_kevsync/kev_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ async def fetch_kev_data(kev_json_url: str) -> dict:
Exception: If the KEV JSON or schema cannot be retrieved or if validation fails.
"""
# Create a Request object so we can test the safety of the URL
key_json_request = urllib.request.Request(kev_json_url)
if key_json_request.type not in ALLOWED_URL_SCHEMES:
raise ValueError("Invalid URL scheme in json URL: %s" % key_json_request.type)
kev_json_request = urllib.request.Request(kev_json_url)
if kev_json_request.type not in ALLOWED_URL_SCHEMES:
raise ValueError("Invalid URL scheme in json URL: %s" % kev_json_request.type)

# Below we disable the bandit blacklist for the urllib.request.urlopen() function
# since we are checking the URL scheme before using.
Expand Down Expand Up @@ -69,10 +69,10 @@ async def validate_kev_data(kev_json: dict, kev_schema_url: str) -> None:
Exception: If the KEV JSON schema cannot be retrieved or if validation fails.
"""
# Create a Request object to test the safety of the URL
key_schema_request = urllib.request.Request(kev_schema_url)
if key_schema_request.type not in ALLOWED_URL_SCHEMES:
kev_schema_request = urllib.request.Request(kev_schema_url)
if kev_schema_request.type not in ALLOWED_URL_SCHEMES:
raise ValueError(
"Invalid URL scheme in schema URL: %s" % key_schema_request.type
"Invalid URL scheme in schema URL: %s" % kev_schema_request.type
)
with urllib.request.urlopen(kev_schema_url) as response: # nosec B310
if response.status != 200:
Expand Down

0 comments on commit caa2d26

Please sign in to comment.