mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2025-04-12 23:29:37 +08:00
修复cmd执行之后返回错误的格式 (#488)
This commit is contained in:
parent
359c352022
commit
6481c9774e
@ -166,7 +166,7 @@ async def _(event: MessageEvent, cmd: str = ArgPlainText('cmd')):
|
|||||||
try:
|
try:
|
||||||
result = (stdout or stderr).decode('utf-8')
|
result = (stdout or stderr).decode('utf-8')
|
||||||
except Exception:
|
except Exception:
|
||||||
result = str(stdout or stderr)
|
result = (stdout or stderr).decode('gbk')
|
||||||
await run_cmd.finish(f'{cmd}\n运行结果:\n{result}')
|
await run_cmd.finish(f'{cmd}\n运行结果:\n{result}')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user