parent
385a66c6ec
commit
dc67e2155a
|
@ -20,8 +20,8 @@ async def shell(client, message):
|
||||||
stdout, stderr = await process.communicate(stdin.encode() if stdin else None)
|
stdout, stderr = await process.communicate(stdin.encode() if stdin else None)
|
||||||
returncode = process.returncode
|
returncode = process.returncode
|
||||||
text = f'<b>Exit Code:</b> <code>{returncode}</code>\n'
|
text = f'<b>Exit Code:</b> <code>{returncode}</code>\n'
|
||||||
stdout = stdout.decode().replace('\r', '').rstrip('\n')
|
stdout = stdout.decode().replace('\r', '').strip('\n').rstrip()
|
||||||
stderr = stderr.decode().replace('\r', '').rstrip('\n')
|
stderr = stderr.decode().replace('\r', '').strip('\n').rstrip()
|
||||||
if stderr:
|
if stderr:
|
||||||
text += f'<code>{html.escape(stderr)}</code>\n'
|
text += f'<code>{html.escape(stderr)}</code>\n'
|
||||||
if stdout:
|
if stdout:
|
||||||
|
|
Loading…
Reference in New Issue