New generation of security and access (#652)

* New generation of security and access

* Update const.py

* Update validate.py

* Update addon.py

* Update validate.py

* Fix name

* Allow access

* Fix

* add logs

* change message

* add rating

* fix lint

* fix lint

* fix

* Fix
This commit is contained in:
Pascal Vizeli
2018-08-16 22:49:08 +02:00
committed by GitHub
parent 85fbde8e36
commit ecd12732ee
9 changed files with 132 additions and 16 deletions

View File

@@ -30,10 +30,10 @@ def api_process(method):
"""Return api information."""
try:
answer = await method(api, *args, **kwargs)
except RuntimeError as err:
return api_return_error(message=str(err))
except HassioError:
return api_return_error()
except RuntimeError as err:
return api_return_error(message=str(err))
if isinstance(answer, dict):
return api_return_ok(data=answer)