diff --git a/dispatcher.py b/dispatcher.py index 64772de8..cedd3556 100644 --- a/dispatcher.py +++ b/dispatcher.py @@ -255,7 +255,8 @@ def report_undone(self, verbose): 'queue, but were not reported as done (does not matters ' 'success or fail):\n', schema='test_var') for task_id in undone: - color_stdout('- %s' % yaml.safe_dump(task_id)) + task_id_str = yaml.safe_dump(task_id, default_flow_style=True) + color_stdout('- %s' % task_id_str) else: # Visually continue StatisticsWatcher.print_statistics() output. color_stdout('* undone: %d\n' % len(undone), schema='test_var') diff --git a/lib/worker.py b/lib/worker.py index 86852fa1..de3ee563 100644 --- a/lib/worker.py +++ b/lib/worker.py @@ -300,7 +300,8 @@ def run_task(self, task_id): try: task = self.find_task(task_id) with open(self.reproduce_file, 'a') as f: - f.write('- ' + yaml.safe_dump(task.id)) + task_id_str = yaml.safe_dump(task.id, default_flow_style=True) + f.write('- ' + task_id_str) short_status = self.suite.run_test( task, self.server, self.inspector) except KeyboardInterrupt: diff --git a/listeners.py b/listeners.py index cc41c528..c4d6fcc9 100644 --- a/listeners.py +++ b/listeners.py @@ -60,7 +60,8 @@ def print_statistics(self): color_stdout('Failed tasks:\n', schema='test_var') for task_id, worker_name, show_reproduce_content in self.failed_tasks: logfile = self.get_logfile(worker_name) - color_stdout('- %s' % yaml.safe_dump(task_id), schema='test_var') + task_id_str = yaml.safe_dump(task_id, default_flow_style=True) + color_stdout('- %s' % task_id_str, schema='test_var') color_stdout('# logfile: %s\n' % logfile) reproduce_file_path = get_reproduce_file(worker_name) color_stdout('# reproduce file: %s\n' % reproduce_file_path)