mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
feature #192 Fixed error on to_xml method when no @xml, now it returns nil
This commit is contained in:
parent
943e0d2578
commit
a185719604
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user