From 978406421150e13d61f5f14f12d1511b106b5b7a Mon Sep 17 00:00:00 2001 From: akrzos Date: Thu, 18 Jan 2018 15:07:02 -0500 Subject: [PATCH] Rally task args broken due to type conversion Looks like some recent upstream changes in packages cause dumping a dictionary as a string to include the unicode reference in front of the string. We can use json.dumps to avoid this issue. Change-Id: I3c2dbc7cf372a02cb1d2a24eccb3a61d0cbd6168 --- browbeat/rally.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browbeat/rally.py b/browbeat/rally.py index 45661d3a4..dc2f12df7 100644 --- a/browbeat/rally.py +++ b/browbeat/rally.py @@ -41,7 +41,7 @@ class Rally(workloadbase.WorkloadBase): def run_scenario(self, task_file, scenario_args, result_dir, test_name, benchmark): self.logger.debug("--------------------------------") self.logger.debug("task_file: {}".format(task_file)) - self.logger.info("Running with scenario_args: {}".format(scenario_args)) + self.logger.info("Running with scenario_args: {}".format(json.dumps(scenario_args))) self.logger.debug("result_dir: {}".format(result_dir)) self.logger.debug("test_name: {}".format(test_name)) self.logger.debug("--------------------------------") @@ -49,7 +49,7 @@ class Rally(workloadbase.WorkloadBase): from_ts = int(time.time() * 1000) if 'sleep_before' in self.config['rally']: time.sleep(self.config['rally']['sleep_before']) - task_args = str(scenario_args).replace("'", "\"") + task_args = json.dumps(scenario_args) plugins = [] if "plugins" in self.config['rally']: if len(self.config['rally']['plugins']) > 0: