Fix pulseaudio creating zombies (#293)

This commit is contained in:
enkore 2016-01-05 12:51:39 +01:00
parent f40feda2c4
commit a356e42c12

View File

@ -172,14 +172,14 @@ class PulseAudio(Module, ColorRangeModule):
command += 'unmute' command += 'unmute'
else: else:
command += 'mute' command += 'mute'
subprocess.Popen(command.split()) subprocess.run(command.split())
def increase_volume(self): def increase_volume(self):
if self.has_amixer: if self.has_amixer:
command = "amixer -q -D pulse sset Master %s%%+" % self.step command = "amixer -q -D pulse sset Master %s%%+" % self.step
subprocess.Popen(command.split()) subprocess.run(command.split())
def decrease_volume(self): def decrease_volume(self):
if self.has_amixer: if self.has_amixer:
command = "amixer -q -D pulse sset Master %s%%-" % self.step command = "amixer -q -D pulse sset Master %s%%-" % self.step
subprocess.Popen(command.split()) subprocess.run(command.split())