From 9cae49e1fb19a589fadf1593f6872a31a042bf2f Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 19 Feb 2013 19:22:39 +0100 Subject: daemon: except KeyError when getting artist/title Signed-off-by: Florian Pritz --- daemon.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-24-g4f1b