From b9890005a48ecfebdf732179747b55d4fe2426e3 Mon Sep 17 00:00:00 2001 From: Goffi Date: Sat, 8 Oct 2011 20:27:15 +0200 Subject: [PATCH] plugin XEP-0163: user event mood with no item fix --- src/plugins/plugin_xep_0163.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/plugin_xep_0163.py b/src/plugins/plugin_xep_0163.py index 1f44c107..de535981 100755 --- a/src/plugins/plugin_xep_0163.py +++ b/src/plugins/plugin_xep_0163.py @@ -101,6 +101,9 @@ class XEP_0163(): return self.pep_out_cb[event_type](data, profile) def userMoodCB(self, itemsEvent, profile): + if not itemsEvent.items: + debug(_("No item found")) + return try: mood_elem = filter(lambda x:x.name == "mood", itemsEvent.items[0].children)[0] except KeyError: