From ee218f16c2a449c6d72d550807114676e1e96d94 Mon Sep 17 00:00:00 2001 From: kaliko Date: Wed, 16 Dec 2020 14:34:23 +0100 Subject: [PATCH] Fixed some code style and comment --- sima/lib/webserv.py | 2 +- sima/mpdclient.py | 2 +- sima/plugins/internal/crop.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sima/lib/webserv.py b/sima/lib/webserv.py index 35835c3..c6a906f 100644 --- a/sima/lib/webserv.py +++ b/sima/lib/webserv.py @@ -253,7 +253,7 @@ class WebService(Plugin): return [] tolookfor = self.player.playlist[-1].Artist self.log.info('Looking for artist similar to "%s"', tolookfor) - self.log.debug(repr(tolookfor)) + self.log.debug('%r', tolookfor) similar = self.ws_similar_artists(tolookfor) if not similar: self.log.info('Got nothing from %s!', self.ws.name) diff --git a/sima/mpdclient.py b/sima/mpdclient.py index 0d0ff1e..0c2e0b2 100644 --- a/sima/mpdclient.py +++ b/sima/mpdclient.py @@ -33,7 +33,7 @@ from .utils.leven import levenshtein_ratio class PlayerError(Exception): - """Fatal error in poller.""" + """Fatal error in the player.""" # Some decorators diff --git a/sima/plugins/internal/crop.py b/sima/plugins/internal/crop.py index 3f987ce..8f70acd 100644 --- a/sima/plugins/internal/crop.py +++ b/sima/plugins/internal/crop.py @@ -21,13 +21,13 @@ """ # standard library import -#from select import select # third parties components # local import from ...lib.plugin import Plugin + class Crop(Plugin): """ Crop playlist on next track @@ -57,7 +57,7 @@ class Crop(Plugin): return if not self.daemon.enabled: self.log.debug('Queueing disabled, not cropping') - return False + return player = self.daemon.player if player.currentsong().pos > self.target: self.log.debug('cropping playlist') -- 2.39.5