diff options
Diffstat (limited to 'test/lib/ansible_test/_internal/coverage/xml.py')
-rw-r--r-- | test/lib/ansible_test/_internal/coverage/xml.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/lib/ansible_test/_internal/coverage/xml.py b/test/lib/ansible_test/_internal/coverage/xml.py index 5a5875e99b..94b5abc595 100644 --- a/test/lib/ansible_test/_internal/coverage/xml.py +++ b/test/lib/ansible_test/_internal/coverage/xml.py @@ -2,7 +2,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -import json import os import time @@ -17,9 +16,9 @@ from xml.dom import ( minidom, ) -from ..util import ( - to_text, +from ..io import ( make_dirs, + read_json_file, ) from ..util_common import ( @@ -72,8 +71,7 @@ def _generate_powershell_xml(coverage_file): :type coverage_file: str :rtype: Element """ - with open(coverage_file, 'rb') as coverage_fd: - coverage_info = json.loads(to_text(coverage_fd.read())) + coverage_info = read_json_file(coverage_file) content_root = data_context().content.root is_ansible = data_context().content.is_ansible |