aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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'):