mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 06:37:52 +00:00
Fix two more instances of JSON parsing synology (#7014)
Add an optional extended description…
This commit is contained in:
parent
d5e3cd51a5
commit
90e73fda3c
@ -129,7 +129,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
|||||||
_LOGGER.exception("Error on %s", syno_camera_url)
|
_LOGGER.exception("Error on %s", syno_camera_url)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
camera_resp = yield from camera_req.json()
|
camera_resp = yield from camera_req.json(content_type=None)
|
||||||
cameras = camera_resp['data']['cameras']
|
cameras = camera_resp['data']['cameras']
|
||||||
|
|
||||||
# add cameras
|
# add cameras
|
||||||
@ -174,7 +174,7 @@ def get_session_id(hass, websession, username, password, login_url, timeout):
|
|||||||
login_url,
|
login_url,
|
||||||
params=auth_payload
|
params=auth_payload
|
||||||
)
|
)
|
||||||
auth_resp = yield from auth_req.json()
|
auth_resp = yield from auth_req.json(content_type=None)
|
||||||
return auth_resp['data']['sid']
|
return auth_resp['data']['sid']
|
||||||
|
|
||||||
except (asyncio.TimeoutError, aiohttp.ClientError):
|
except (asyncio.TimeoutError, aiohttp.ClientError):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user