diff options
author | Jose Lausuch <jose.lausuch@ericsson.com> | 2017-02-23 10:07:43 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-02-23 10:07:43 +0000 |
commit | c2477ac190dbf321b6bf136a906264b3d9e113cc (patch) | |
tree | 348445243a08229dc22f66f732ea9dab0c299e98 /functest/utils/functest_utils.py | |
parent | a7bae3c764e1a1f006cc7670ad455091e30d7a5c (diff) | |
parent | 0a09ecbcaefbc03f2a2bb9157be05007100aee90 (diff) |
Merge "Prepare env will exit when an error is raised"
Diffstat (limited to 'functest/utils/functest_utils.py')
-rw-r--r-- | functest/utils/functest_utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py index b2c36cff..78831c11 100644 --- a/functest/utils/functest_utils.py +++ b/functest/utils/functest_utils.py @@ -291,6 +291,13 @@ def get_ci_envvars(): return ci_env_var +def execute_command_raise(cmd, info=False, error_msg="", + verbose=True, output_file=None): + ret = execute_command(cmd, info, error_msg, verbose, output_file) + if ret != 0: + raise Exception(error_msg) + + def execute_command(cmd, info=False, error_msg="", verbose=True, output_file=None): if not error_msg: |