Improve SSL certs used by aiohttp (#9958)

* Improve SSL certs used by aiohttp

* Add certifi package

* Lint
This commit is contained in:
Paulus Schoutsen 2017-10-19 01:47:57 -07:00 committed by Pascal Vizeli
parent 38cb32afd6
commit 6cce934f72
5 changed files with 14 additions and 5 deletions

View file

@ -46,9 +46,6 @@ class CloudIoT:
remove_hass_stop_listener = None
session = async_get_clientsession(self.cloud.hass)
headers = {
hdrs.AUTHORIZATION: 'Bearer {}'.format(self.cloud.access_token)
}
@asyncio.coroutine
def _handle_hass_stop(event):
@ -63,7 +60,10 @@ class CloudIoT:
yield from hass.async_add_job(auth_api.check_token, self.cloud)
self.client = client = yield from session.ws_connect(
self.cloud.relayer, headers=headers)
self.cloud.relayer, headers={
hdrs.AUTHORIZATION:
'Bearer {}'.format(self.cloud.access_token)
})
self.tries = 0
remove_hass_stop_listener = hass.bus.async_listen_once(