From 16a4180fab3ac65f02c6c03642f21011d194f688 Mon Sep 17 00:00:00 2001 From: Corey Edwards Date: Wed, 23 Jan 2019 09:50:04 -0700 Subject: [PATCH] Fix mpd logging format string field (#20333) * Fix format string field * Remove str.format and let _LOGGER handle formatting * Remove trailing period from log message --- homeassistant/components/media_player/mpd.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/media_player/mpd.py b/homeassistant/components/media_player/mpd.py index d006b5692f1..09d0a976b82 100644 --- a/homeassistant/components/media_player/mpd.py +++ b/homeassistant/components/media_player/mpd.py @@ -300,14 +300,13 @@ class MpdDevice(MediaPlayerDevice): def play_media(self, media_type, media_id, **kwargs): """Send the media player the command for playing a playlist.""" - _LOGGER.debug(str.format("Playing playlist: {0}", media_id)) + _LOGGER.debug("Playing playlist: %s", media_id) if media_type == MEDIA_TYPE_PLAYLIST: if media_id in self._playlists: self._currentplaylist = media_id else: self._currentplaylist = None - _LOGGER.warning(str.format("Unknown playlist name %s.", - media_id)) + _LOGGER.warning("Unknown playlist name %s", media_id) self._client.clear() self._client.load(media_id) self._client.play()