From 9dd9ee4aff5829c1e7aa076fa75efaf1d2c245e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tino=20V=C3=A1zquez?= Date: Tue, 6 Jul 2010 14:55:04 +0200 Subject: [PATCH] feature #200: Correcting wrong error hadling --- src/cli/oneimage | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli/oneimage b/src/cli/oneimage index 690e017180..546540bf9c 100755 --- a/src/cli/oneimage +++ b/src/cli/oneimage @@ -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']