1
0
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:
Daniel Molina 2010-07-02 16:17:37 +02:00 committed by Ruben S. Montero
parent a185719604
commit 76040825aa

View File

@ -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