Do not .rstrip output from .sh

https://t.me/Memes10ks/241292
This commit is contained in:
blank X 2020-12-23 14:22:27 +07:00
parent 08b36db902
commit 7d4d4ad312
1 changed files with 2 additions and 2 deletions

View File

@ -20,8 +20,8 @@ async def shell(client, message):
stdout, stderr = await process.communicate(stdin.encode() if stdin else None)
returncode = process.returncode
text = f'<b>Exit Code:</b> <code>{returncode}</code>\n'
stdout = stdout.decode().replace('\r', '').strip('\n')
stderr = stderr.decode().replace('\r', '').strip('\n')
stdout = stdout.decode().replace('\r', '').lstrip('\n')
stderr = stderr.decode().replace('\r', '').lstrip('\n')
if stderr:
text += f'<code>{html.escape(stderr)}</code>\n'
if stdout: