mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
feature #192 Fixed NOKOGIRI returning 0 instead of nil
This commit is contained in:
parent
a185719604
commit
76040825aa
@ -41,6 +41,9 @@ module OpenNebula
|
||||
def [](key)
|
||||
if NOKOGIRI
|
||||
element=@xml.xpath(key.to_s.upcase)
|
||||
if element.size == 0
|
||||
return nil
|
||||
end
|
||||
else
|
||||
element=@xml.elements[key.to_s.upcase]
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user