mirror of https://github.com/Ruslan-Isaev/modules
Update gitrepo.py
parent
babab4dffe
commit
405ba4c240
|
@ -9,8 +9,8 @@ from .. import loader, utils
|
|||
async def run_subprocess(command):
|
||||
process = await asyncio.create_subprocess_exec(
|
||||
*command,
|
||||
stdout=asyncio.subprocess.PIPE,
|
||||
stderr=asyncio.subprocess.PIPE
|
||||
stdout=asyncio.subprocess.DEVNULL,
|
||||
stderr=asyncio.subprocess.DEVNULL
|
||||
)
|
||||
stdout, stderr = await process.communicate()
|
||||
return process.returncode, stdout.decode(), stderr.decode()
|
||||
|
@ -106,4 +106,4 @@ class GitRepoMod(loader.Module):
|
|||
await message.delete()
|
||||
|
||||
except Exception as e:
|
||||
await utils.answer(message, f"<b>Произошла ошибка: {str(e)}</b>")
|
||||
await utils.answer(message, f"<b>Произошла ошибка: {str(e)}</b>")
|
||||
|
|
Loading…
Reference in New Issue