more guard logic
This commit is contained in:
parent
0d7cf0761d
commit
b305885fad
1 changed files with 9 additions and 5 deletions
|
@ -87,12 +87,16 @@ class MicrosoftKbChecker
|
||||||
def query_cve
|
def query_cve
|
||||||
if os_available?
|
if os_available?
|
||||||
response = make_request
|
response = make_request
|
||||||
json = parse_json(response)
|
if response.code == 200
|
||||||
os_results = select_os(json)
|
json = parse_json(response)
|
||||||
if os_results.nil?
|
os_results = select_os(json)
|
||||||
'Product not found in response data.'
|
if os_results.nil?
|
||||||
|
'Product not found in response data.'
|
||||||
|
else
|
||||||
|
kbs_for_os(os_results)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
kbs_for_os(os_results)
|
'Problem with HTTP response data.'
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
'Operating system not found.'
|
'Operating system not found.'
|
||||||
|
|
Loading…
Add table
Reference in a new issue