X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fdispatcher%2Ffile.py;h=24fc22dd48b7370f7a24a6d2291d1d5f8ad3805d;hb=d0c9fc59e53cace276093f8785fbdcd16fb1d2aa;hp=8d3c3693dff42d1bd5a49562ba31bfcda3496637;hpb=8315a0b074e90e3f38515a51820f9bce761b2b3a;p=yardstick.git diff --git a/yardstick/dispatcher/file.py b/yardstick/dispatcher/file.py index 8d3c3693d..24fc22dd4 100644 --- a/yardstick/dispatcher/file.py +++ b/yardstick/dispatcher/file.py @@ -31,13 +31,8 @@ class FileDispatcher(DispatchBase): def __init__(self, conf): super(FileDispatcher, self).__init__(conf) - self.result = [] + self.target = conf['dispatcher_file'].get('file_path', + consts.DEFAULT_OUTPUT_FILE) - def record_result_data(self, data): - self.result.append(data) - - def flush_result_data(self): - file_path = self.conf.get('file_path', consts.DEFAULT_OUTPUT_FILE) - - data = {'status': 1, 'result': self.result} - utils.write_json_to_file(file_path, data) + def flush_result_data(self, data): + utils.write_json_to_file(self.target, data)