Skip to content

Commit 6a82eb6

Browse files
authored
[mypy/requests] code fixes because of types-requests changes (#3889)
`types-requests` now allows `HTTPError.response` to be `None` and in order to make mypy happy, we need to check for it see python/typeshed#10875 Signed-off-by: Gerd Oberlechner <[email protected]>
1 parent 5982275 commit 6a82eb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reconcile/utils/internal_groups/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def _check_response(self, resp: requests.Response) -> None:
4646
try:
4747
resp.raise_for_status()
4848
except requests.exceptions.HTTPError as e:
49-
if e.response.status_code == 404:
49+
if e.response is not None and e.response.status_code == 404:
5050
raise NotFound
5151
raise
5252

0 commit comments

Comments
 (0)