mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-18 22:56:31 +00:00
Fix json encode bug
This commit is contained in:
parent
efd1de2fc2
commit
32cb00258b
@ -53,7 +53,10 @@ class HostControll(object):
|
||||
elif response == "ERROR":
|
||||
return False
|
||||
else:
|
||||
try:
|
||||
return json.loads(response)
|
||||
except ValueError:
|
||||
_LOGGER.warning("Json parse error from HostControll.")
|
||||
|
||||
except asyncio.TimeoutError:
|
||||
_LOGGER.error("Timeout from HostControll!")
|
||||
|
@ -17,7 +17,7 @@ do
|
||||
IFS=" " read -r -a parse <<< $cmd
|
||||
|
||||
if [ ${parse[0]} == "info" ]; then
|
||||
echo "{'host': 'resinos', 'version': '$RESINOS_HASSIO_VERSION'}"
|
||||
echo "{ \"host\": \"resinos\", \"version\": \"$RESINOS_HASSIO_VERSION\" }"
|
||||
continue
|
||||
fi
|
||||
if [ ${parse[0]} == "reboot" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user