From ba1a556002438b9030e6b3d87909045b95bd5ad0 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Tue, 21 Oct 2014 15:04:29 +0200 Subject: [PATCH] bug #3254: error handling in onetemplate instantiate --- src/cli/onetemplate | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cli/onetemplate b/src/cli/onetemplate index d4baebcd2b..067e03c8a1 100755 --- a/src/cli/onetemplate +++ b/src/cli/onetemplate @@ -196,7 +196,12 @@ cmd=CommandParser::CmdParser.new(ARGV) do on_hold = options[:hold] != nil extra_template = "" - t.info + rc = t.info + + if OpenNebula.is_error?(rc) + STDERR.puts rc.message + exit(-1) + end if args[1] extra_template = File.read(args[1])