From: kaliko Date: Sat, 12 Dec 2020 18:26:36 +0000 (+0100) Subject: Fixed code smell X-Git-Tag: 0.16.0~18 X-Git-Url: http://git.kaliko.me/?a=commitdiff_plain;h=03b3fce479e480222a1161f56d6551f5b47e83b9;hp=d68801c922c83bdb1c97279b41f9925981b523e5;p=mpd-sima.git Fixed code smell --- diff --git a/sima/plugins/core/uniq.py b/sima/plugins/core/uniq.py index 292de6f..60d1680 100644 --- a/sima/plugins/core/uniq.py +++ b/sima/plugins/core/uniq.py @@ -54,11 +54,10 @@ class Uniq(Plugin): self.sub_chan() def is_capable(self): - if {'channels', 'subscribe'}.issubset(set(self.player.commands())): - # Groove Basin compatibility - # For some reason Groove Basin have channels command but no - # subscribe command‽ - return True + # Groove Basin compatibility + # For some reason Groove Basin have channels command but no + # subscribe command‽ + return {'channels', 'subscribe'}.issubset(set(self.player.commands())) def get_channels(self): return [chan for chan in self.player.channels() if diff --git a/sima/utils/config.py b/sima/utils/config.py index 2778422..c9240ea 100644 --- a/sima/utils/config.py +++ b/sima/utils/config.py @@ -91,7 +91,7 @@ DEFAULT_CONF = { # -class ConfMan(object): # CONFIG MANAGER CLASS +class ConfMan: # CONFIG MANAGER CLASS """ Configuration manager. Default configuration is stored in DEFAULT_CONF dictionnary. @@ -185,7 +185,6 @@ class ConfMan(object): # CONFIG MANAGER CLASS # honor MPD_HOST format as in mpc(1) for command line option --host if self.startopt.get('host'): if '@' in self.startopt.get('host'): - print(self.startopt.get('host').split('@')) passwd, host = self.startopt.get('host').split('@') self.config.set('MPD', 'password', passwd) self.config.set('MPD', 'host', host)