summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-02-19 19:22:39 +0100
committerFlorian Pritz <bluewind@xinu.at>2013-02-19 19:22:39 +0100
commit9cae49e1fb19a589fadf1593f6872a31a042bf2f (patch)
treef0d44c0cab29d78f4d4dd522839ab6106416e2d9
parent5b1afe32cf7496acea8182278aca83f59e8384e3 (diff)
downloadmpd-box-9cae49e1fb19a589fadf1593f6872a31a042bf2f.tar.gz
mpd-box-9cae49e1fb19a589fadf1593f6872a31a042bf2f.tar.xz
daemon: except KeyError when getting artist/title
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xdaemon.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/daemon.py b/daemon.py
index 9d35f33..769e6d5 100755
--- a/daemon.py
+++ b/daemon.py
@@ -49,7 +49,11 @@ class Daemon:
incoming = self.client.currentsong()
- self.line = incoming["artist"] + " - " + incoming["title"]
+ try:
+ self.line = incoming["artist"] + " - " + incoming["title"]
+ except KeyError:
+ self.line = " -- NO INFO --"
+
if self.line != old_line:
changed = True