Fix HassIO bug with supervisor update & log (#7282)

This commit is contained in:
Pascal Vizeli authored and Paulus Schoutsen committed 2017-04-27 09:02:43 -07:00
1 parent 9fc89ba744
commit 3735c2e761
1 file changed
+4 -2
+4 -2
View File
@@ -122,7 +122,8 @@ def async_setup(hass, config):
yield from hassio.send_command("/host/shutdown")
elif service.service == SERVICE_SUPERVISOR_UPDATE:
yield from hassio.send_command(
"/supervisor/update", payload=version)
"/supervisor/update", payload=version,
timeout=LONG_TASK_TIMEOUT)
elif service.service == SERVICE_SUPERVISOR_RELOAD:
yield from hassio.send_command(
"/supervisor/reload", timeout=LONG_TASK_TIMEOUT)
@@ -183,8 +184,9 @@ class HassIO(object):
)
if answer and answer['result'] == 'ok':
return answer['data'] if answer['data'] else True
elif answer:
_LOGGER.error("%s return error %s.", cmd, answer['message'])
_LOGGER.error("%s return error %s.", cmd, answer['message'])
return False
@asyncio.coroutine