diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-11-06 20:42:37 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-11-06 20:42:37 +0100 |
commit | 3f4def1037e32a77f7ca132c8a0a7575ddee1976 (patch) | |
tree | 25baf8db114cd4edf662de088229c08521b25030 /plugins | |
parent | 5111f59fb6674f8ff746ada28008bd3d409821b9 (diff) | |
parent | 46ccf6a966123531d8e5c0e5891496b6cb829b94 (diff) | |
download | poezio-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
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mpd_client.py | 10 |
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']) |