[modules/pulseaudio] Fix status extraction

With multiple devices, extracting mute status and volumes failed
(because the loop would continue even after it found the correct device)
This commit is contained in:
Tobi-wan Kenobi 2016-12-20 07:49:21 +01:00
parent 846d28714a
commit a705adf207

View file

@ -87,13 +87,14 @@ class Module(bumblebee.engine.Module):
for line in result.split("\n"): for line in result.split("\n"):
if device in line: if device in line:
found = True found = True
continue
if found == False: if found == False:
continue continue
for pattern in self._patterns: for pattern in self._patterns:
if not pattern["expr"] in line: if not pattern["expr"] in line:
continue continue
if pattern["callback"](line) == False: if pattern["callback"](line) == False and found == True:
break return
def state(self, widget): def state(self, widget):
if self._mute: if self._mute: