# HG changeset patch # User Goffi # Date 1318098435 -7200 # Node ID ef9a4453959b621449b4ac9a0520dad771c44b8c # Parent 2e0dc5299bce91bfba461bf39db209f2e04c6a4c plugin XEP-0163: user event mood with no item fix diff -r 2e0dc5299bce -r ef9a4453959b src/plugins/plugin_xep_0163.py --- a/src/plugins/plugin_xep_0163.py Sat Oct 08 20:26:36 2011 +0200 +++ b/src/plugins/plugin_xep_0163.py Sat Oct 08 20:27:15 2011 +0200 @@ -101,6 +101,9 @@ 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: