summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-11-06 20:41:42 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-11-06 20:41:42 +0100
commit46ccf6a966123531d8e5c0e5891496b6cb829b94 (patch)
tree140915bbd4116d9d3a7175a1563566a54fef439d
parent9cdfe38bcc5292e1cf9f71fd4ad7749f22ba29a8 (diff)
downloadpoezio-46ccf6a966123531d8e5c0e5891496b6cb829b94.tar.gz
poezio-46ccf6a966123531d8e5c0e5891496b6cb829b94.tar.bz2
poezio-46ccf6a966123531d8e5c0e5891496b6cb829b94.tar.xz
poezio-46ccf6a966123531d8e5c0e5891496b6cb829b94.zip
do not catch errors, actually, since there’s a bug in the mpd lib with python3 that makes it impossible to catch.
-rw-r--r--plugins/mpd_client.py10
1 files changed, 1 insertions, 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'])