supervisor/hassio/exceptions.py
Pascal Vizeli 35aae69f23
Support armv7 and allow support of multible arch types per CPU (#892)
* Support armv7 and first abstraction

* Change layout

* Add more type hints

* Fix imports

* Update

* move forward

* add tests

* fix type

* fix lint & tests

* fix tests

* Fix unittests

* Fix create folder

* cleanup

* Fix import order

* cleanup loop parameter

* cleanup init function

* Allow changeable image name

* fix setup

* Fix load of arch

* Fix lint

* Add typing

* fix init

* fix hassos cli problem & stick on supervisor arch

* address comments

* cleanup

* Fix image selfheal

* Add comment

* update uvloop

* remove uvloop

* fix tagging

* Fix install name

* Fix validate build config

* Abstract image_name from system cache
2019-01-31 18:47:44 +01:00

140 lines
2.2 KiB
Python

"""Core Exceptions."""
class HassioError(Exception):
"""Root exception."""
class HassioNotSupportedError(HassioError):
"""Function is not supported."""
# HomeAssistant
class HomeAssistantError(HassioError):
"""Home Assistant exception."""
class HomeAssistantUpdateError(HomeAssistantError):
"""Error on update of a Home Assistant."""
class HomeAssistantAPIError(HomeAssistantError):
"""Home Assistant API exception."""
class HomeAssistantAuthError(HomeAssistantAPIError):
"""Home Assistant Auth API exception."""
# HassOS
class HassOSError(HassioError):
"""HassOS exception."""
class HassOSUpdateError(HassOSError):
"""Error on update of a HassOS."""
class HassOSNotSupportedError(HassioNotSupportedError):
"""Function not supported by HassOS."""
# Arch
class HassioArchNotFound(HassioNotSupportedError):
"""No matches with exists arch."""
# Updater
class HassioUpdaterError(HassioError):
"""Error on Updater."""
# Auth
class AuthError(HassioError):
"""Auth errors."""
# Host
class HostError(HassioError):
"""Internal Host error."""
class HostNotSupportedError(HassioNotSupportedError):
"""Host function is not supprted."""
class HostServiceError(HostError):
"""Host service functions fails."""
class HostAppArmorError(HostError):
"""Host apparmor functions fails."""
# API
class APIError(HassioError, RuntimeError):
"""API errors."""
class APIForbidden(APIError):
"""API forbidden error."""
# Service / Discovery
class DiscoveryError(HassioError):
"""Discovery Errors."""
class ServicesError(HassioError):
"""Services Errors."""
# utils/gdbus
class DBusError(HassioError):
"""DBus generic error."""
class DBusNotConnectedError(HostNotSupportedError):
"""DBus is not connected and call a method."""
class DBusFatalError(DBusError):
"""DBus call going wrong."""
class DBusParseError(DBusError):
"""DBus parse error."""
# util/apparmor
class AppArmorError(HostAppArmorError):
"""General AppArmor error."""
class AppArmorFileError(AppArmorError):
"""AppArmor profile file error."""
class AppArmorInvalidError(AppArmorError):
"""AppArmor profile validate error."""