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