From 356ac845d4af3639be6ae8788d876c0b22f64aae Mon Sep 17 00:00:00 2001 From: echel0n Date: Thu, 10 Jul 2014 19:53:27 -0700 Subject: [PATCH] Fix for XBMC notifier, KeyError: 'result' --- sickbeard/notifiers/xbmc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sickbeard/notifiers/xbmc.py b/sickbeard/notifiers/xbmc.py index a48be434..e8966b17 100644 --- a/sickbeard/notifiers/xbmc.py +++ b/sickbeard/notifiers/xbmc.py @@ -143,7 +143,7 @@ class XBMCNotifier: command = '{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"%s","message":"%s", "image": "%s"},"id":1}' % ( title.encode("utf-8"), message.encode("utf-8"), self.sb_logo_url) notifyResult = self._send_to_xbmc_json(command, curHost, username, password) - if notifyResult: + if len(notifyResult) and getattr(notifyResult, 'result', None): result += curHost + ':' + notifyResult["result"].decode(sickbeard.SYS_ENCODING) else: if sickbeard.XBMC_ALWAYS_ON or force: