fix error forwarding

This commit is contained in:
xeals 2023-04-26 17:20:17 +10:00
parent 4b07aeb10c
commit a1f2f175cd
Signed by: xeals
GPG Key ID: A498C7AF27EC6B5C

2
bot.py
View File

@ -87,7 +87,7 @@ class BotClient(discord.Client):
["node", "calc_main.js", "--"] + args, stdout=sp.PIPE, stderr=sp.PIPE ["node", "calc_main.js", "--"] + args, stdout=sp.PIPE, stderr=sp.PIPE
) )
if proc.returncode != 0: if proc.returncode != 0:
_log.error(f"running calculator: {proc.stderr}") raise Exception(proc.stderr.decode())
return proc.stdout.decode() return proc.stdout.decode()
def is_replay(self, message: discord.Message) -> bool: def is_replay(self, message: discord.Message) -> bool: