prevent a traceback when we get a wrong disco#info reply (a feature without a var attribute). Fixes #5232

This commit is contained in:
Yann Leboulanger 2009-10-05 13:46:38 +02:00
parent e0dac306f7
commit ea6c062b9a
1 changed files with 3 additions and 1 deletions

View File

@ -871,7 +871,9 @@ class ConnectionDisco:
is_muc = True is_muc = True
identities.append(attr) identities.append(attr)
elif i.getName() == 'feature': elif i.getName() == 'feature':
features.append(i.getAttr('var')) var = i.getAttr('var')
if var:
features.append(var)
elif i.getName() == 'x' and i.getNamespace() == common.xmpp.NS_DATA: elif i.getName() == 'x' and i.getNamespace() == common.xmpp.NS_DATA:
data.append(common.xmpp.DataForm(node=i)) data.append(common.xmpp.DataForm(node=i))
jid = helpers.get_full_jid_from_iq(iq_obj) jid = helpers.get_full_jid_from_iq(iq_obj)