diff --git a/src/oca/ruby/OpenNebula/XMLUtils.rb b/src/oca/ruby/OpenNebula/XMLUtils.rb index 2ed93c1765..31682be19c 100644 --- a/src/oca/ruby/OpenNebula/XMLUtils.rb +++ b/src/oca/ruby/OpenNebula/XMLUtils.rb @@ -95,7 +95,7 @@ module OpenNebula end def to_hash - if !@hash + if !@hash && @xml @hash=Crack::XML.parse(to_xml) end return @hash @@ -157,7 +157,7 @@ module OpenNebula end def to_hash - if !@hash + if !@hash && @xml @hash=Crack::XML.parse(to_xml) end return @hash