File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ def __init__(
247
247
proxy = proxy ,
248
248
proxy_auth = proxy_auth ,
249
249
unsync_clock = unsync_clock ,
250
- loop = self .loop ,
250
+ loop = self ._loop ,
251
251
)
252
252
253
253
self ._handlers : dict [str , Callable ] = {"ready" : self ._handle_ready }
@@ -274,7 +274,7 @@ def __init__(
274
274
self ._tasks = set ()
275
275
276
276
async def __aenter__ (self ) -> Client :
277
- if self ._loop is MISSING :
277
+ if self ._loop is None :
278
278
try :
279
279
self ._loop = asyncio .get_running_loop ()
280
280
except RuntimeError :
Original file line number Diff line number Diff line change @@ -175,9 +175,7 @@ def __init__(
175
175
loop : asyncio .AbstractEventLoop | None = None ,
176
176
unsync_clock : bool = True ,
177
177
) -> None :
178
- self .loop : asyncio .AbstractEventLoop = (
179
- asyncio .get_event_loop () if loop is None else loop
180
- )
178
+ self .loop : asyncio .AbstractEventLoop = loop or MISSING
181
179
self .connector = connector
182
180
self .__session : aiohttp .ClientSession = MISSING # filled in static_login
183
181
self ._locks : weakref .WeakValueDictionary = weakref .WeakValueDictionary ()
You can’t perform that action at this time.
0 commit comments