Skip to content

Commit 7de6dab

Browse files
committed
Fix error in authentication exception handling
1 parent a73032d commit 7de6dab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pythonkuma/uptimekuma.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ async def metrics(self) -> dict[str | int, UptimeKumaMonitor]:
7979
)
8080
request.raise_for_status()
8181
except ClientResponseError as e:
82-
if e.status is HTTPStatus.UNAUTHORIZED:
82+
if e.status == HTTPStatus.UNAUTHORIZED:
8383
msg = "Authentication failed for %s"
8484
raise UptimeKumaAuthenticationException(msg, str(url)) from e
8585
msg = "Request for %s failed with status code %s"

0 commit comments

Comments
 (0)