From 193b6b66daf213de2b98219d0762e91c253e9c80 Mon Sep 17 00:00:00 2001 From: Arx Cruz Date: Mon, 15 Dec 2014 12:54:28 +0100 Subject: [PATCH] Small refactor in run function This patch properly print in the debug the exception that might ocurr when rally calls the cmd.cliutils.run command Change-Id: Ib4121f442196989ce77d6e3081f4288d35c52098 --- rally/cmd/cliutils.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/rally/cmd/cliutils.py b/rally/cmd/cliutils.py index f26ac21728..74d9465251 100644 --- a/rally/cmd/cliutils.py +++ b/rally/cmd/cliutils.py @@ -297,12 +297,8 @@ def run(argv, categories): validate_deprecated_args(argv, fn) ret = fn(*fn_args, **fn_kwargs) return(ret) - except (IOError, TypeError, exceptions.DeploymentNotFound) as e: - if logging.is_debug(): - raise - print(e) - return 1 - except exceptions.TaskNotFound as e: + except (IOError, TypeError, exceptions.DeploymentNotFound, + exceptions.TaskNotFound) as e: if logging.is_debug(): LOG.exception(e) print(e)