do not catch errors, actually, since there’s a bug in the mpd lib with python3 that makes it impossible to catch.

This commit is contained in:
Florent Le Coz 2011-11-06 20:41:42 +01:00
parent 9cdfe38bcc
commit 46ccf6a966

View file

@ -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
current = c.currentsong()
current_time = float(c.status()['elapsed'])