Index: Tools/Scripts/webkitpy/layout_tests/generate_results_dashboard.py |
diff --git a/Tools/Scripts/webkitpy/layout_tests/generate_results_dashboard.py b/Tools/Scripts/webkitpy/layout_tests/generate_results_dashboard.py |
index d47c48fe870a42ea35659ecc02849ec24862cb12..5c8a2b2987dafc8e4597827f5f77ebbfe814e1b8 100644 |
--- a/Tools/Scripts/webkitpy/layout_tests/generate_results_dashboard.py |
+++ b/Tools/Scripts/webkitpy/layout_tests/generate_results_dashboard.py |
@@ -120,8 +120,7 @@ class GenerateDashBoard(object): |
results_directories.append(full_dir_path) |
results_directories.sort(reverse=True, key=lambda x: self._filesystem.mtime(x)) |
current_failing_results_json_file = self._filesystem.join(results_directories[0], 'failing_results.json') |
- with self._filesystem.open_text_file_for_reading(current_failing_results_json_file) as file: |
- input_json_string = file.readline() |
+ input_json_string = self._filesystem.read_text_file(current_failing_results_json_file) |
input_json_string = input_json_string[12:-2] # Remove preceeding string ADD_RESULTS( and ); at the end |
self._current_result_json_dict['tests'] = json.loads(input_json_string)['tests'] |
results_directories = results_directories[1:] |
@@ -133,13 +132,10 @@ class GenerateDashBoard(object): |
for json_file in results_directories: |
failing_json_file_path = self._filesystem.join(json_file, 'failing_results.json') |
full_json_file_path = self._filesystem.join(json_file, 'full_results.json') |
- with self._filesystem.open_text_file_for_reading(failing_json_file_path) as file: |
- json_string = file.readline() |
+ json_string = self._filesystem.read_text_file(failing_json_file_path) |
json_string = json_string[12:-2] # Remove preceeding string ADD_RESULTS( and ); at the end |
self._old_failing_results_list.append(json.loads(json_string)) |
- |
- with self._filesystem.open_text_file_for_reading(full_json_file_path) as full_file: |
- json_string_full_result = full_file.readline() |
+ json_string_full_result = self._filesystem.read_text_file(full_json_file_path) |
self._old_full_results_list.append(json.loads(json_string_full_result)) |
self._copy_dashboard_html() |