1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[core] toss out nil-value keys when checking required credentials

closes #587
This commit is contained in:
geemus 2011-11-08 09:13:53 -06:00
parent e623b573b6
commit 63ca297eae

View file

@ -176,7 +176,13 @@ module Fog
end end
def validate_options(options) def validate_options(options)
missing = requirements - options.keys keys = []
for key, value in options
unless value.nil?
keys << key
end
end
missing = requirements - keys
unless missing.empty? unless missing.empty?
raise ArgumentError, "Missing required arguments: #{missing.join(', ')}" raise ArgumentError, "Missing required arguments: #{missing.join(', ')}"
end end