]> kaliko git repositories - mpd-sima.git/commitdiff
Fixed code smell
authorkaliko <kaliko@azylum.org>
Sat, 12 Dec 2020 18:26:36 +0000 (19:26 +0100)
committerkaliko <kaliko@azylum.org>
Sat, 12 Dec 2020 18:37:42 +0000 (19:37 +0100)
sima/plugins/core/uniq.py
sima/utils/config.py

index 292de6f6f38e09ac8e76c319959fb38e863ab724..60d1680ed174862817bdf830831ab9462d448eb1 100644 (file)
@@ -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
index 2778422369aee46c1ae139a2926fd7e0f43510ae..c9240ea1c8a094d9b244c4708f5cf6588196d2c6 100644 (file)
@@ -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)