From 59abdea9e7e790979325f383c2041ca5248a89b5 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Sat, 29 Jun 2024 14:18:15 -0500 Subject: [PATCH 1/2] Make api calls with key Signed-off-by: Andrew Brain --- augur/tasks/github/util/github_data_access.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/util/github_data_access.py b/augur/tasks/github/util/github_data_access.py index 074c64f251..46843b86d2 100644 --- a/augur/tasks/github/util/github_data_access.py +++ b/augur/tasks/github/util/github_data_access.py @@ -98,7 +98,7 @@ def make_request(self, url, method="GET", timeout=100): with httpx.Client() as client: - response = client.request(method=method, url=url, timeout=timeout, follow_redirects=True) + response = client.request(method=method, url=url, auth=self.key_manager, timeout=timeout, follow_redirects=True) if response.status_code in [403, 429]: raise RatelimitException(response) From 628a1a2c13ad5e82cafb0e35303f420448116d02 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Sat, 29 Jun 2024 14:25:13 -0500 Subject: [PATCH 2/2] Make changes recommend by linter Signed-off-by: Andrew Brain --- augur/tasks/github/util/github_data_access.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/util/github_data_access.py b/augur/tasks/github/util/github_data_access.py index 46843b86d2..2f4c988014 100644 --- a/augur/tasks/github/util/github_data_access.py +++ b/augur/tasks/github/util/github_data_access.py @@ -103,7 +103,7 @@ def make_request(self, url, method="GET", timeout=100): if response.status_code in [403, 429]: raise RatelimitException(response) - elif response.status_code == 404: + if response.status_code == 404: raise UrlNotFoundException(f"Could not find {url}") response.raise_for_status()