prevent some traceback when receiving an error when we want to configure pep. Fixes #5737

This commit is contained in:
Yann Leboulanger 2010-05-05 19:32:18 +02:00
parent e6a4eb7c17
commit ed28b14b82
1 changed files with 6 additions and 0 deletions

View File

@ -674,7 +674,13 @@ class ConnectionVcard:
# Ask metacontacts before roster
self.get_metacontacts()
elif self.awaiting_answers[id_][0] == PEP_CONFIG:
if iq_obj.getType() == 'error':
return
if not iq_obj.getTag('pubsub'):
return
conf = iq_obj.getTag('pubsub').getTag('configure')
if not conf:
return
node = conf.getAttr('node')
form_tag = conf.getTag('x', namespace=common.xmpp.NS_DATA)
if form_tag: