From 7de6dabad78ef4a2a201fc53617a9569b3f37a5f Mon Sep 17 00:00:00 2001 From: tr4nt0r <4445816+tr4nt0r@users.noreply.github.com> Date: Tue, 15 Jul 2025 16:45:39 +0200 Subject: [PATCH] Fix error in authentication exception handling --- pythonkuma/uptimekuma.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonkuma/uptimekuma.py b/pythonkuma/uptimekuma.py index 8f1816e..4048a69 100644 --- a/pythonkuma/uptimekuma.py +++ b/pythonkuma/uptimekuma.py @@ -79,7 +79,7 @@ async def metrics(self) -> dict[str | int, UptimeKumaMonitor]: ) request.raise_for_status() except ClientResponseError as e: - if e.status is HTTPStatus.UNAUTHORIZED: + if e.status == HTTPStatus.UNAUTHORIZED: msg = "Authentication failed for %s" raise UptimeKumaAuthenticationException(msg, str(url)) from e msg = "Request for %s failed with status code %s"