Skip to content

Commit b96bc11

Browse files
committed
Code cleanup
Code cleanup
1 parent 733e2ab commit b96bc11

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

modules/auxiliary/admin/http/cisco_ssm_onprem_account.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ def run
5858
unless res
5959
fail_with(Failure::Unreachable, 'Failed to receive a reply from the server.')
6060
end
61-
case res.code
62-
when 200
61+
if res.code == 200
6362
print_good('Server reachable.')
6463
else
6564
fail_with(Failure::UnexpectedReply, 'Unexpected reply from the target.')
@@ -115,8 +114,7 @@ def run
115114
unless res
116115
fail_with(Failure::Unreachable, 'Failed to receive a reply from the server.')
117116
end
118-
case res.code
119-
when 200
117+
if res.code == 200
120118
json = res.get_json_document
121119
if json.key?('error_message')
122120
fail_with(Failure::UnexpectedReply, json['error_message'])
@@ -147,8 +145,7 @@ def run
147145
fail_with(Failure::Unreachable, 'Failed to receive a reply from the server.')
148146
end
149147

150-
case res.code
151-
when 200
148+
if res.code == 200
152149
json = res.get_json_document
153150
if json.key?('error_message')
154151
fail_with(Failure::UnexpectedReply, json['error_message'])

0 commit comments

Comments
 (0)