summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-11-06 20:42:37 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-11-06 20:42:37 +0100
commit3f4def1037e32a77f7ca132c8a0a7575ddee1976 (patch)
tree25baf8db114cd4edf662de088229c08521b25030
parent5111f59fb6674f8ff746ada28008bd3d409821b9 (diff)
parent46ccf6a966123531d8e5c0e5891496b6cb829b94 (diff)
downloadpoezio-3f4def1037e32a77f7ca132c8a0a7575ddee1976.tar.gz
poezio-3f4def1037e32a77f7ca132c8a0a7575ddee1976.tar.bz2
poezio-3f4def1037e32a77f7ca132c8a0a7575ddee1976.tar.xz
poezio-3f4def1037e32a77f7ca132c8a0a7575ddee1976.zip
Merge branch 'plugins' of http://git.louiz.org/poezio into plugins
-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'])