Skip to content
Snippets Groups Projects
Commit e3b84484 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Show stderr

parent b6af1942
No related branches found
No related tags found
No related merge requests found
......@@ -93,8 +93,9 @@ def register_handlers(bot):
"with me, sorry...".format(user), channel_id)
return
try:
output = subprocess.check_output(['supervisorctl'] +
msg.split()).decode('ascii')
output = subprocess.check_output(
['supervisorctl'] + msg.split(),
stderr=subprocess.STDOUT).decode('ascii')
except subprocess.CalledProcessError as e:
output = e.output.decode('ascii')
bot.send_message(output, channel_id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment