diff options
author | Matt Martz <matt@sivel.net> | 2018-09-07 11:51:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-07 11:51:41 -0500 |
commit | 7a61763fba4accbee97b97f7651826eeea9fbc7d (patch) | |
tree | 9b8ff4cdc41ae7fd00ca73c4d8318de0571e7902 /hacking/report.py | |
parent | 19acd5d4f741ad520c053b42bda74bb1be15d05b (diff) | |
download | ansible-7a61763fba4accbee97b97f7651826eeea9fbc7d.tar.gz |
Don't require requests in hacking/report.py (#45350)
* Don't require requests in hacking/report.py
* move ansible import
Diffstat (limited to 'hacking/report.py')
-rwxr-xr-x | hacking/report.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/hacking/report.py b/hacking/report.py index ddf3f33eba..47f64e7984 100755 --- a/hacking/report.py +++ b/hacking/report.py @@ -5,8 +5,8 @@ from __future__ import (absolute_import, print_function) import argparse +import json import os -import requests import sqlite3 import sys @@ -21,7 +21,9 @@ if ANSIBLE_PATH not in sys.path: if ANSIBLE_TEST_PATH not in sys.path: sys.path.insert(0, ANSIBLE_TEST_PATH) +from ansible.module_utils.urls import open_url from ansible.parsing.metadata import extract_metadata + from lib.target import walk_integration_targets @@ -139,8 +141,8 @@ def populate_modules(): def populate_coverage(): - response = requests.get('https://codecov.io/api/gh/ansible/ansible/tree/devel/?src=extension') - data = response.json() + response = open_url('https://codecov.io/api/gh/ansible/ansible/tree/devel/?src=extension') + data = json.load(response) files = data['commit']['report']['files'] coverage_rows = [] |