summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2017-02-14 06:05:22 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-14 06:05:22 +0000
commit4862f2b4033e5792015a9ab920262af4edaaf27c (patch)
tree5b3ad6430c404bc921d9726cca42e027dde25ccb
parent3ed0f51b1aa14d70a32d1ca8bb41122628c59202 (diff)
parent89f7f07398e8219656fa7e25f7b1a32692b280a9 (diff)
Merge "Bugfix: write_json_to_file: use json.dump with files"
-rw-r--r--yardstick/common/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/yardstick/common/utils.py b/yardstick/common/utils.py
index 473bbf540..174ac0a5a 100644
--- a/yardstick/common/utils.py
+++ b/yardstick/common/utils.py
@@ -149,7 +149,8 @@ def get_neutron_client():
def write_json_to_file(path, data, mode='w'):
- write_file(path, jsonutils.dump_as_bytes(data), mode)
+ with open(path, mode) as f:
+ jsonutils.dump(data, f)
def write_file(path, data, mode='w'):