plugin XEP-0163: user event mood with no item fix

This commit is contained in:
Goffi 2011-10-08 20:27:15 +02:00
commit b9890005a4

View file

@ -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: