Fix more pylint warnings
This commit is contained in:
parent
c3912dd14e
commit
4660e856ca
@ -7,7 +7,8 @@ def get_mpd_protocol_version():
|
||||
return u'0.16.0'
|
||||
|
||||
class MopidyException(Exception):
|
||||
def __init__(self, message):
|
||||
def __init__(self, message, *args, **kwargs):
|
||||
super(MopidyException, self).__init__(message, *args, **kwargs)
|
||||
self._message = message
|
||||
|
||||
@property
|
||||
|
||||
@ -104,17 +104,17 @@ class GStreamerPlaybackController(BasePlaybackController):
|
||||
return 0
|
||||
|
||||
def destroy(self):
|
||||
bin, self._bin = self._bin, None
|
||||
playbin, self._bin = self._bin, None
|
||||
bus, self._bus = self._bus, None
|
||||
|
||||
bus.disconnect(self._bus_id)
|
||||
bus.remove_signal_watch()
|
||||
bin.get_state()
|
||||
bin.set_state(gst.STATE_NULL)
|
||||
playbin.get_state()
|
||||
playbin.set_state(gst.STATE_NULL)
|
||||
bus.set_flushing(True)
|
||||
|
||||
del bus
|
||||
del bin
|
||||
del playbin
|
||||
|
||||
|
||||
class GStreamerStoredPlaylistsController(BaseStoredPlaylistsController):
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
class BaseMixer(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
@property
|
||||
def volume(self):
|
||||
"""
|
||||
|
||||
@ -8,7 +8,8 @@ class AlsaMixer(BaseMixer):
|
||||
volume.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(AlsaMixer, self).__init__(*args, **kwargs)
|
||||
self._mixer = alsaaudio.Mixer()
|
||||
|
||||
def _get_volume(self):
|
||||
|
||||
@ -26,11 +26,13 @@ class DenonMixer(BaseMixer):
|
||||
- :attr:`mopidy.settings.MIXER_EXT_PORT` -- Example: ``/dev/ttyUSB0``
|
||||
"""
|
||||
|
||||
def __init__(self, device=None):
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""
|
||||
Connects using the serial specifications from Denon's RS-232 Protocol
|
||||
specification: 9600bps 8N1.
|
||||
"""
|
||||
super(DenonMixer, self).__init__(*args, **kwargs)
|
||||
device = kwargs.get('device', None)
|
||||
self._device = device or Serial(port=MIXER_EXT_PORT, timeout=0.2)
|
||||
self._levels = ['99'] + ["%(#)02d" % {'#': v} for v in range(0, 99)]
|
||||
self._volume = 0
|
||||
|
||||
@ -3,7 +3,8 @@ from mopidy.mixers import BaseMixer
|
||||
class DummyMixer(BaseMixer):
|
||||
"""Mixer which just stores and reports the chosen volume."""
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(DummyMixer, self).__init__(*args, **kwargs)
|
||||
self._volume = None
|
||||
|
||||
def _get_volume(self):
|
||||
|
||||
@ -40,7 +40,8 @@ class NadMixer(BaseMixer):
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(NadMixer, self).__init__(*args, **kwargs)
|
||||
self._volume = None
|
||||
self._pipe, other_end = Pipe()
|
||||
NadTalker(pipe=other_end).start()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user