Skip to content

Commit 921e6fd

Browse files
author
Renier Morales
committed
Remove unnecessary check on token pair
1 parent db56014 commit 921e6fd

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

lib/softlayer/Client.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,7 @@ def initialize(options = {})
120120
# and assign a time out if the settings offer one
121121
@network_timeout = settings[:timeout] if settings.has_key?(:timeout)
122122

123-
if token_based?
124-
raise "A SoftLayer Client requires a userId" if !@userId
125-
raise "A SoftLayer Client requires an authToken" if !@authToken || @api_key.empty?
126-
else
123+
unless token_based?
127124
raise "A SoftLayer Client requires a username" if !@username || @username.empty?
128125
raise "A SoftLayer Client requires an api_key" if !@api_key || @api_key.empty?
129126
end

0 commit comments

Comments
 (0)