libkas: Acount for changes to asyncio.wait
Only tasks should be provided to it, no longer coroutines. Python 3.9 starts to complain about the deprecated pattern. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
204019f54e
commit
79641ac382
@ -109,10 +109,11 @@ async def run_cmd_async(cmd, cwd, env=None, fail=True, liveupdate=True):
|
||||
raise ex
|
||||
return (errno.EPERM, str(ex))
|
||||
|
||||
await asyncio.wait([
|
||||
_read_stream(process.stdout, logo.log_stdout),
|
||||
_read_stream(process.stderr, logo.log_stderr)
|
||||
])
|
||||
tasks = [
|
||||
asyncio.ensure_future(_read_stream(process.stdout, logo.log_stdout)),
|
||||
asyncio.ensure_future(_read_stream(process.stderr, logo.log_stderr))
|
||||
]
|
||||
await asyncio.wait(tasks)
|
||||
ret = await process.wait()
|
||||
|
||||
if ret and fail:
|
||||
|
Loading…
Reference in New Issue
Block a user