fix traceback when we get an error from pep service. see #3053

This commit is contained in:
Yann Leboulanger 2007-12-13 20:44:30 +00:00
parent 19761f081f
commit 554194d954
1 changed files with 6 additions and 5 deletions

View File

@ -1122,11 +1122,12 @@ class ConnectionVcard:
conf = iq_obj.getTag('pubsub').getTag('configure')
node = conf.getAttr('node')
form_tag = conf.getTag('x', namespace=common.xmpp.NS_DATA)
form = common.dataforms.ExtendForm(node=form_tag)
for field in form.iter_fields():
if field.var == 'pubsub#access_model':
self.dispatch('PEP_ACCESS_MODEL', (node, field.value))
break
if form_tag:
form = common.dataforms.ExtendForm(node=form_tag)
for field in form.iter_fields():
if field.var == 'pubsub#access_model':
self.dispatch('PEP_ACCESS_MODEL', (node, field.value))
break
del self.awaiting_answers[id]