Skip to content

Commit fa70f06

Browse files
authored
Merge pull request #2 from speechmatics/fix-async-for
Remove incorrect use of async for
2 parents cbd61de + 58d87f2 commit fa70f06

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

stream_transcriber/streams.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Functions, variables and classes for handling the transcription streams
33
"""
4+
45
import asyncio
56
import logging
67
import subprocess
@@ -248,14 +249,14 @@ async def load_stream(stream_name: str):
248249
[log_task, send_audio_task, asr_task, stream_clone_task],
249250
return_when=asyncio.FIRST_EXCEPTION,
250251
)
251-
async for done_routine in done:
252+
for done_routine in done:
252253
if done_routine.exception() is not None:
253254
LOGGER.error(
254255
"Exception in return %s",
255256
done_routine.exception(),
256257
extra={"stream": stream_name},
257258
)
258-
async for pending_routine in pending:
259+
for pending_routine in pending:
259260
pending_routine.cancel()
260261
if pending_routine.exception() is not None:
261262
LOGGER.error(

0 commit comments

Comments
 (0)