Don't use shell=true when restarting pulseaudio

This commit is contained in:
Mathieu Comandon 2018-10-29 22:00:45 -07:00
parent 9ce1cd8394
commit 2f6a4f7a78

View file

@ -1,9 +1,12 @@
"""Whatever it is we want to do with audio module"""
import subprocess
import time
from lutris.util.log import logger
def reset_pulse():
"""Reset pulseaudio."""
pulse_reset = "pulseaudio --kill && sleep 1 && pulseaudio --start"
subprocess.Popen(pulse_reset, shell=True)
subprocess.Popen(["pulseaudio", "--kill"])
time.sleep(1000)
subprocess.Popen(["pulseaudio", "--start"])
logger.debug("PulseAudio restarted")