From a185719604807dc9d1d2a6971c376eb95dc76ccd Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Fri, 2 Jul 2010 16:16:51 +0200 Subject: [PATCH] feature #192 Fixed error on to_xml method when no @xml, now it returns nil --- src/oca/ruby/OpenNebula/XMLUtils.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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