File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed
Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change 55
66from __future__ import annotations
77
8- import asyncio
9-
108from plugwise .constants import LOGGER
119from plugwise .exceptions import (
1210 ConnectionFailedError ,
@@ -36,17 +34,7 @@ def __init__(
3634 """Set the constructor for this class."""
3735 if not websession :
3836 aio_timeout = ClientTimeout (total = timeout )
39-
40- async def _create_session () -> ClientSession :
41- return ClientSession (timeout = aio_timeout ) # pragma: no cover
42-
43- loop = asyncio .get_event_loop ()
44- if loop .is_running ():
45- self ._websession = ClientSession (timeout = aio_timeout )
46- else :
47- self ._websession = loop .run_until_complete (
48- _create_session ()
49- ) # pragma: no cover
37+ self ._websession = ClientSession (timeout = aio_timeout )
5038 else :
5139 self ._websession = websession
5240
You can’t perform that action at this time.
0 commit comments