From 46ccf6a966123531d8e5c0e5891496b6cb829b94 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 6 Nov 2011 20:41:42 +0100 Subject: =?UTF-8?q?do=20not=20catch=20errors,=20actually,=20since=20there?= =?UTF-8?q?=E2=80=99s=20a=20bug=20in=20the=20mpd=20lib=20with=20python3=20?= =?UTF-8?q?that=20makes=20it=20impossible=20to=20catch.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mpd_client.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/plugins/mpd_client.py b/plugins/mpd_client.py index a7690a9d..bfba7df0 100644 --- a/plugins/mpd_client.py +++ b/plugins/mpd_client.py @@ -11,18 +11,10 @@ class Plugin(BasePlugin): def command_mpd(self, args): args = shell_split(args) c = mpd.MPDClient() - try: c.connect(host=self.config.get('host', 'localhost'), port=self.config.get('host', '6600')) - except Exception as e: - self.core.information('%s' % (e,), 'Error') - return password = self.config.get('password', '') if password: - try: - c.password(password) - except Exception as e: - self.core.information('%s' % (e,), 'Error') - return + c.password(password) current = c.currentsong() current_time = float(c.status()['elapsed']) -- cgit v1.2.3