Update tasks

This commit is contained in:
2022-03-16 00:39:45 +03:00
parent fa07225a24
commit e15e39c0ca
6 changed files with 760 additions and 677 deletions

View File

@@ -0,0 +1,11 @@
import asyncio
from typing import Optional
async def run_cmd(cmd: str) -> tuple[bytes, bytes, Optional[int]]:
proc = await asyncio.create_subprocess_shell(
cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE
)
stdout, stderr = await proc.communicate()
return stdout, stderr, proc.returncode