aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRex Lee <limingjiang@huawei.com>2017-03-09 01:26:35 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-09 01:26:35 +0000
commit6fd6dd87fe4914b970d13e346194612fbc685e64 (patch)
tree4b286d291dd679daf16898452edbc39a71ea2e26
parent8fc6288589a060ac6c420ccd2d824ebe329e56d3 (diff)
parent7541c9613e62ca0b295f6111c67b0956c2fd7403 (diff)
Merge "Bugfix: don't use jsonutils.load, use loads()"
-rw-r--r--yardstick/common/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/yardstick/common/utils.py b/yardstick/common/utils.py
index e53f4b416..d2be8000e 100644
--- a/yardstick/common/utils.py
+++ b/yardstick/common/utils.py
@@ -134,7 +134,9 @@ def source_env(env_file):
def read_json_from_file(path):
with open(path, 'r') as f:
- return jsonutils.load(f)
+ j = f.read()
+ # don't use jsonutils.load() it conflicts with already decoded input
+ return jsonutils.loads(j)
def write_json_to_file(path, data, mode='w'):