@@ -128,15 +128,15 @@ def run
128
128
doc . elements . each ( 'Details/Hosts' ) do |ele |
129
129
# Add an empty string if a variable doesn't exist, we have to check it
130
130
# somewhere and it's easier to do it here.
131
- host_ipaddress = ( ele . attributes [ "host_ipaddress" ] != nil ? ele . attributes [ "host_ipaddress" ] : "" )
131
+ host_ipaddress = ele . attributes [ "host_ipaddress" ] || ""
132
132
133
133
ele . elements . each ( 'HostDetails' ) do |details |
134
- domain_name = ( details . attributes [ "domain_name" ] != nil ? details . attributes [ "domain_name" ] : "" )
135
- username = ( details . attributes [ "username" ] != nil ? details . attributes [ "username" ] : "" )
136
- password_encoded = ( details . attributes [ "password" ] != nil ? details . attributes [ "password" ] : "" )
134
+ domain_name = details . attributes [ "domain_name" ] || ""
135
+ username = details . attributes [ "username" ] || ""
136
+ password_encoded = details . attributes [ "password" ] || ""
137
137
password = decode_password ( password_encoded )
138
- type = ( details . attributes [ "type" ] != nil ? details . attributes [ "type" ] : "" )
139
- subtype = ( details . attributes [ "subtype" ] != nil ? details . attributes [ "subtype" ] : "" )
138
+ type = details . attributes [ "type" ] || ""
139
+ subtype = details . attributes [ "subtype" ] || ""
140
140
141
141
if not ( type =~ /Windows/ or subtype =~ /Windows/ )
142
142
# With AS/400 we get some garbage in the domain name even though it doesn't exist
@@ -169,7 +169,6 @@ def run
169
169
create_credential_login ( host_login_data )
170
170
end
171
171
end
172
-
173
172
end
174
173
175
174
print_line
0 commit comments