prevent traceback when we get an empty roster item exchange message

This commit is contained in:
Yann Leboulanger 2009-07-22 10:48:28 +02:00
parent 7966126c3b
commit 8622a3cca7
1 changed files with 2 additions and 0 deletions

View File

@ -1820,6 +1820,8 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
exchange_items_list = {}
jid_from = helpers.get_full_jid_from_iq(msg)
items_list = msg.getTag('x').getChildren()
if not items_list:
return
action = items_list[0].getAttr('action')
if action == None:
action = 'add'