diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-03-01 13:23:54 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-03-01 13:23:54 +0000 |
commit | 14a0f0b13e37cf0a65603915b7c75b86fd4a4383 (patch) | |
tree | 1ba938f9b7ea3fe53a441dc8315383271a51cfb4 /yardstick/common/utils.py | |
parent | fe8bd59413e3525849f9b75752d657a737b5a0ad (diff) | |
parent | 9dc587f166af106f7e30dbe00ddf152e9be6f1ea (diff) |
Merge "Module to manage pip packages"
Diffstat (limited to 'yardstick/common/utils.py')
-rw-r--r-- | yardstick/common/utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/yardstick/common/utils.py b/yardstick/common/utils.py index 495290122..a77a4cad6 100644 --- a/yardstick/common/utils.py +++ b/yardstick/common/utils.py @@ -31,6 +31,7 @@ import six from flask import jsonify from six.moves import configparser from oslo_serialization import jsonutils +from oslo_utils import encodeutils import yardstick @@ -106,13 +107,12 @@ def remove_file(path): raise -def execute_command(cmd): +def execute_command(cmd, **kwargs): exec_msg = "Executing command: '%s'" % cmd logger.debug(exec_msg) - output = subprocess.check_output(cmd.split()).split(os.linesep) - - return output + output = subprocess.check_output(cmd.split(), **kwargs) + return encodeutils.safe_decode(output, incoming='utf-8').split(os.linesep) def source_env(env_file): |