Commits

Tanel Liiv committed a06daa6

Handle MPD client connection timeout

Comments (0)

Files changed (1)

plugins/mpdinfo.py

     try:
         playing = client.currentsong()
     except:
-        client = mpd.MPDClient()
-        client.connect("localhost", 6600)
+        try:
+            client = mpd.MPDClient()
+            client.connect("localhost", 6600)
+        except:
+            return [['red', "Cannot connect to MPD", 0]]
 
     try:
         playing = client.currentsong()