Skip to content

Commit

Permalink
Handle ConnectTimeout exception
Browse files Browse the repository at this point in the history
  • Loading branch information
natekspencer committed Feb 14, 2021
1 parent 58495c9 commit d439222
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pylitterbot/account.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Account access and data handling for Litter-Robot endpoint."""
import logging

from httpx import ConnectError, HTTPStatusError
from httpx import ConnectError, ConnectTimeout, HTTPStatusError

from .const import ID
from .exceptions import LitterRobotException, LitterRobotLoginException
Expand Down Expand Up @@ -56,7 +56,7 @@ async def connect(
) from ex
else:
raise LitterRobotException("Unable to login to Litter-Robot.") from ex
except ConnectError as ex:
except (ConnectError, ConnectTimeout) as ex:
raise LitterRobotException(
"Unable to communicate with the Litter-Robot API."
) from ex
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pylitterbot
version = 2021.2.3
version = 2021.2.4
author = Nathan Spencer
author_email = [email protected]
description = Python package for controlling a Litter-Robot Connect self-cleaning litter box.
Expand Down

0 comments on commit d439222

Please sign in to comment.