prevent traceback when we get malformed data in adhoc process.

This commit is contained in:
Yann Leboulanger 2009-06-19 07:23:08 +02:00
parent 3b1f2833b3
commit a29a00178e
1 changed files with 4 additions and 1 deletions

View File

@ -297,7 +297,9 @@ class CommandWindow:
self.send_command(action) self.send_command(action)
def stage3_next_form(self, command): def stage3_next_form(self, command):
assert isinstance(command, xmpp.Node) if not isinstance(command, xmpp.Node):
self.stage5(error=_('Service sent malformed data'), senderror=True)
return
self.remove_pulsing() self.remove_pulsing()
self.sending_form_progressbar.hide() self.sending_form_progressbar.hide()
@ -307,6 +309,7 @@ class CommandWindow:
elif self.sessionid != command.getAttr('sessionid'): elif self.sessionid != command.getAttr('sessionid'):
self.stage5(error=_('Service changed the session identifier.'), self.stage5(error=_('Service changed the session identifier.'),
senderror=True) senderror=True)
return
self.form_status = command.getAttr('status') self.form_status = command.getAttr('status')