mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-10-29 05:29:39 +00:00
Leverage access and refresh tokens if available (#575)
* Leverage access and refresh tokens if available * Update homeassistant.py * Update homeassistant.py * Update proxy.py * Migrate HomeAssistant to new exception layout * Fix build for 3.7 * Cleanups * Fix style * fix log strings * Fix new style * Fix travis build * python 3.7 * next try * fix * fix lint * Fix lint p2 * Add logging * Fix logging * fix access * Fix spell * fix return * Fix runtime * Add to hass config
This commit is contained in:
committed by
Pascal Vizeli
parent
1b481e0b37
commit
4df42e054d
@@ -1,4 +1,7 @@
|
||||
"""Core Exceptions."""
|
||||
import asyncio
|
||||
|
||||
import aiohttp
|
||||
|
||||
|
||||
class HassioError(Exception):
|
||||
@@ -11,6 +14,29 @@ class HassioNotSupportedError(HassioError):
|
||||
pass
|
||||
|
||||
|
||||
# HomeAssistant
|
||||
|
||||
class HomeAssistantError(HassioError):
|
||||
"""Home Assistant exception."""
|
||||
pass
|
||||
|
||||
|
||||
class HomeAssistantUpdateError(HomeAssistantError):
|
||||
"""Error on update of a Home Assistant."""
|
||||
pass
|
||||
|
||||
|
||||
class HomeAssistantAuthError(HomeAssistantError):
|
||||
"""Home Assistant Auth API exception."""
|
||||
pass
|
||||
|
||||
|
||||
class HomeAssistantAPIError(
|
||||
HomeAssistantAuthError, asyncio.TimeoutError, aiohttp.ClientError):
|
||||
"""Home Assistant API exception."""
|
||||
pass
|
||||
|
||||
|
||||
# HassOS
|
||||
|
||||
class HassOSError(HassioError):
|
||||
|
||||
Reference in New Issue
Block a user