Skip to content

Commit

Permalink
Not all SmartZone versions return 400
Browse files Browse the repository at this point in the history
  • Loading branch information
ms264556 committed Aug 13, 2024
1 parent 65aac1c commit d1798a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aioruckus/ajaxsession.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async def login(self) -> None:
async with self.websession.head(
f"https://{self.host}", timeout=3, allow_redirects=False
) as head:
if (head.status == 400):
if (head.status >= 400 and head.status < 500):
# Request Refused - maybe SmartZone
return await self.sz_login()
redirect_to = head.headers["Location"]
Expand Down

0 comments on commit d1798a8

Please sign in to comment.