mirror of https://github.com/MISP/misp-modules
fix: [vulnerability_lookup] Quick fix on a typing and an indentation
- Typing was correct but failing for some old python versionspull/709/head
parent
f829c755ce
commit
6d29742459
|
@ -168,7 +168,7 @@ class VulnerabilityLookupParser(VulnerabilityParser):
|
||||||
)
|
)
|
||||||
getattr(self, feature)(lookup_result)
|
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:
|
for alias in aliases:
|
||||||
query = requests.get(f"{api_url}/vulnerability/{alias}")
|
query = requests.get(f"{api_url}/vulnerability/{alias}")
|
||||||
if query.status_code != 200:
|
if query.status_code != 200:
|
||||||
|
@ -406,7 +406,7 @@ def handler(q=False):
|
||||||
return q
|
return q
|
||||||
request = json.loads(q)
|
request = json.loads(q)
|
||||||
if not check_input_attribute(request.get('attribute', {})):
|
if not check_input_attribute(request.get('attribute', {})):
|
||||||
return {
|
return {
|
||||||
'error': f'{standard_error_message}, which should contain '
|
'error': f'{standard_error_message}, which should contain '
|
||||||
'at least a type, a value and an UUID.'
|
'at least a type, a value and an UUID.'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue