Don't pass in loop (#23984)
* Don't pass in loop * Revert some changes * Lint + Axis revert * reinstate loop * Fix a test * Set loop * Update camera.py * Lint
This commit is contained in:
1 parent
9e96397e6a
commit
f995ab9d54
117 files changed
+179
-187
No files matched your search
@@ -82,7 +82,7 @@ class APIEventStream(HomeAssistantView):
|
||||
raise Unauthorized()
|
||||
hass = request.app['hass']
|
||||
stop_obj = object()
|
||||
to_write = asyncio.Queue(loop=hass.loop)
|
||||
to_write = asyncio.Queue()
|
||||
|
||||
restrict = request.query.get('restrict')
|
||||
if restrict:
|
||||
@@ -119,8 +119,7 @@ class APIEventStream(HomeAssistantView):
|
||||
|
||||
while True:
|
||||
try:
|
||||
with async_timeout.timeout(STREAM_PING_INTERVAL,
|
||||
loop=hass.loop):
|
||||
with async_timeout.timeout(STREAM_PING_INTERVAL):
|
||||
payload = await to_write.get()
|
||||
|
||||
if payload is stop_obj:
|
||||
|
||||
Reference in new issue
Block a user