From 8759dafa0e62c3691b3b9faf4342720d4e13131e Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 10 Jan 2019 17:28:49 +0100 Subject: [PATCH] Let plugin fail if unable to retrieve the status, so it can rely on the automatic reload mechanism instead of swallowing the error --- platypush/plugins/music/mpd/__init__.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/platypush/plugins/music/mpd/__init__.py b/platypush/plugins/music/mpd/__init__.py index a895280aa4..0040cf55f4 100644 --- a/platypush/plugins/music/mpd/__init__.py +++ b/platypush/plugins/music/mpd/__init__.py @@ -309,16 +309,7 @@ class MusicMpdPlugin(MusicPlugin): } """ - retries = 0 - max_retries = 2 - - while retries < max_retries: - try: - return self.client.status() - except Exception as e: - self.logger.warning('Unable to parse mpd status: {}'.format(e)) - retries += 1 - time.sleep(1) + return self.client.status() @action def currentsong(self):