Clean up code.

This commit is contained in:
facetoe 2016-03-28 08:46:25 +08:00
parent 3422469df0
commit b111fd62f1

View File

@ -99,9 +99,8 @@ class PulseAudio(Module, ColorRangeModule):
if sink_state == b'RUNNING':
bestsink = attribs[1]
state = 'RUNNING'
elif (sink_state == b'IDLE' or sink_state == b'SUSPENDED') and state == b'DEFAULT':
elif sink_state in (b'IDLE', b'SUSPENDED') and state == b'DEFAULT':
bestsink = attribs[1]
state = b'IDLE'
return bestsink
def server_info_cb(self, context, server_info_p, userdata):