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

Cleanup websession with new aiohttp ssl (#2861)

This commit is contained in:
Pascal Vizeli
2021-05-14 10:07:00 +02:00
committed by GitHub
parent 1ef46424ea
commit a5ed68b641
7 changed files with 10 additions and 27 deletions

View File

@@ -56,9 +56,6 @@ class CoreSys:
# External objects
self._loop: asyncio.BaseEventLoop = asyncio.get_running_loop()
self._websession: aiohttp.ClientSession = aiohttp.ClientSession()
self._websession_ssl: aiohttp.ClientSession = aiohttp.ClientSession(
connector=aiohttp.TCPConnector(ssl=False)
)
# Global objects
self._config: CoreConfig = CoreConfig()
@@ -104,11 +101,6 @@ class CoreSys:
"""Return websession object."""
return self._websession
@property
def websession_ssl(self) -> aiohttp.ClientSession:
"""Return websession object with disabled SSL."""
return self._websession_ssl
@property
def config(self) -> CoreConfig:
"""Return CoreConfig object."""
@@ -491,11 +483,6 @@ class CoreSysAttributes:
"""Return websession object."""
return self.coresys.websession
@property
def sys_websession_ssl(self) -> aiohttp.ClientSession:
"""Return websession object with disabled SSL."""
return self.coresys.websession_ssl
@property
def sys_config(self) -> CoreConfig:
"""Return CoreConfig object."""