From 03b3fce479e480222a1161f56d6551f5b47e83b9 Mon Sep 17 00:00:00 2001 From: kaliko Date: Sat, 12 Dec 2020 19:26:36 +0100 Subject: [PATCH 1/1] Fixed code smell --- sima/plugins/core/uniq.py | 9 ++++----- sima/utils/config.py | 3 +-- 2 files changed, 5 insertions(+), 7 deletions(-) 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) -- 2.39.5