fix: [vulnerability_lookup] Quick fix on a typing and an indentation

- Typing was correct but failing for some old python versions
pull/709/head
Christian Studer 2024-12-18 09:28:16 +01:00
parent f829c755ce
commit 6d29742459
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 2 additions and 2 deletions

View File

@ -168,7 +168,7 @@ class VulnerabilityLookupParser(VulnerabilityParser):
)
getattr(self, feature)(lookup_result)
def _parse_aliases(self, *aliases: tuple[str]) -> Iterator[str]:
def _parse_aliases(self, *aliases: tuple) -> Iterator[str]:
for alias in aliases:
query = requests.get(f"{api_url}/vulnerability/{alias}")
if query.status_code != 200:
@ -406,7 +406,7 @@ def handler(q=False):
return q
request = json.loads(q)
if not check_input_attribute(request.get('attribute', {})):
return {
return {
'error': f'{standard_error_message}, which should contain '
'at least a type, a value and an UUID.'
}