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
This commit is contained in:
parent
63623b7f76
commit
193b6b66da
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user