changeset fccda8ea864e in /home/hg/repos/python-nbxmpp
details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=fccda8ea864e
description: prevent traceback
diffstat:
nbxmpp/smacks.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (16 lines):
diff -r caac135fb450 -r fccda8ea864e nbxmpp/smacks.py
--- a/nbxmpp/smacks.py Sat Nov 30 09:58:35 2013 +0100
+++ b/nbxmpp/smacks.py Sat Nov 30 11:29:05 2013 +0100
@@ -95,7 +95,11 @@
number of stanzas received by the server. Pops stanzas that were
handled by the server from the queue.
'''
- h = int(stanza.getAttr('h'))
+ h = stanza.getAttr('h')
+ if not h:
+ log.error('Server did not send h attribute')
+ return
+ h = int(h)
diff = self.out_h - h
if len(self.uqueue) < diff or diff < 0: