1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

feature #200: Correcting wrong error hadling

This commit is contained in:
Tino Vázquez 2010-07-06 14:55:04 +02:00
parent df3eeb8f65
commit 9dd9ee4aff

View File

@ -355,15 +355,15 @@ when "register", "create", "add"
result=OpenNebula::Error.new("Can not read template: #{ARGV[0]}")
end
if !is_successful?(result)
exit -1
end
# Get the allocated image
image=OpenNebula::Image.new_with_id(image.id, get_one_client)
image.info
template=image.to_hash
template=template['IMAGE']['TEMPLATE']
if !is_successful?(result)
exit -1
end
# Perform the copy to the image repo if needed
if template['PATH']