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

[Compute|Libvirt] Take into account a query string can be empty, different on some rubies it gives nil, on some empty string

This commit is contained in:
Patrick Debois 2011-09-30 16:12:18 +02:00
parent a90eb43bd2
commit 1e0fa9af89

View file

@ -126,12 +126,16 @@ module Fog
# http://libvirt.org/remote.html
private
def value(name)
unless @parsed_uri.query.nil?
params=CGI.parse(@parsed_uri.query)
if params.has_key?(name)
return params[name].first
else
return nil
end
else
return nil
end
end