From d439222f7946e2313a1d0ce096842d775114cfb7 Mon Sep 17 00:00:00 2001 From: Nathan Spencer Date: Sat, 13 Feb 2021 22:15:29 -0700 Subject: [PATCH] Handle ConnectTimeout exception --- pylitterbot/account.py | 4 ++-- setup.cfg | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pylitterbot/account.py b/pylitterbot/account.py index 8c373cb..d34b053 100644 --- a/pylitterbot/account.py +++ b/pylitterbot/account.py @@ -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 @@ -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 diff --git a/setup.cfg b/setup.cfg index fb30e4d..0130162 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = pylitterbot -version = 2021.2.3 +version = 2021.2.4 author = Nathan Spencer author_email = natekspencer@gmail.com description = Python package for controlling a Litter-Robot Connect self-cleaning litter box.