1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 12:29:08 +00:00

Add arch to addon config / hole api (#38)

* Add arch to addon config / hole api

* fix wrong copy past
This commit is contained in:
Pascal Vizeli
2017-05-09 17:03:59 +02:00
committed by GitHub
parent 5bd1957337
commit c2ba02722c
7 changed files with 40 additions and 8 deletions

View File

@@ -88,6 +88,11 @@ class APIAddons(object):
version = body.get(
ATTR_VERSION, self.addons.get_last_version(addon))
# check if arch supported
if self.addons.arch not in self.addons.get_arch(addon):
raise RuntimeError(
"Addon is not supported on {}".format(self.addons.arch))
return await asyncio.shield(
self.addons.install(addon, version), loop=self.loop)