changeset 94d709743822 in /home/hg/repos/gajim

details:http://hg.gajim.org/gajim?cmd=changeset;node=94d709743822
description: prevent traceback when we get malformed data in adhoc process.

diffstat:

 src/adhoc_commands.py |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 25632b9aa818 -r 94d709743822 src/adhoc_commands.py
--- a/src/adhoc_commands.py     Fri Jun 19 07:20:19 2009 +0200
+++ b/src/adhoc_commands.py     Fri Jun 19 07:23:08 2009 +0200
@@ -297,7 +297,9 @@
                self.send_command(action)
 
        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.sending_form_progressbar.hide()
@@ -307,6 +309,7 @@
                elif self.sessionid != command.getAttr('sessionid'):
                        self.stage5(error=_('Service changed the session 
identifier.'),
                                senderror=True)
+                       return
 
                self.form_status = command.getAttr('status')
 
_______________________________________________
Commits mailing list
Commits@gajim.org
http://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to