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:
parent
a90eb43bd2
commit
1e0fa9af89
1 changed files with 7 additions and 3 deletions
|
@ -126,9 +126,13 @@ module Fog
|
|||
# http://libvirt.org/remote.html
|
||||
private
|
||||
def value(name)
|
||||
params=CGI.parse(@parsed_uri.query)
|
||||
if params.has_key?(name)
|
||||
return params[name].first
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue