Fix pylint erros for sharkiq (#39428)
This commit is contained in:
parent
4a21b1f589
commit
70c241b51b
2 changed files with 6 additions and 6 deletions
|
@ -30,10 +30,10 @@ async def validate_input(hass: core.HomeAssistant, data):
|
|||
with async_timeout.timeout(10):
|
||||
LOGGER.debug("Initialize connection to Ayla networks API")
|
||||
await ayla_api.async_sign_in()
|
||||
except (asyncio.TimeoutError, aiohttp.ClientError):
|
||||
raise CannotConnect
|
||||
except SharkIqAuthError:
|
||||
raise InvalidAuth
|
||||
except (asyncio.TimeoutError, aiohttp.ClientError) as errors:
|
||||
raise CannotConnect from errors
|
||||
except SharkIqAuthError as error:
|
||||
raise InvalidAuth from error
|
||||
|
||||
# Return info that you want to store in the config entry.
|
||||
return {"title": data[CONF_USERNAME]}
|
||||
|
|
|
@ -94,9 +94,9 @@ class SharkIqUpdateCoordinator(DataUpdateCoordinator):
|
|||
)
|
||||
)
|
||||
|
||||
raise UpdateFailed(err)
|
||||
raise UpdateFailed(err) from err
|
||||
except Exception as err: # pylint: disable=broad-except
|
||||
LOGGER.exception("Unexpected error updating SharkIQ", exc_info=err)
|
||||
raise UpdateFailed(err)
|
||||
raise UpdateFailed(err) from err
|
||||
|
||||
return True
|
||||
|
|
Loading…
Add table
Reference in a new issue