changeset e88ec6cb0884 in /home/hg/repos/python-nbxmpp
details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=e88ec6cb0884
description: prevent traceback
diffstat:
nbxmpp/smacks.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (16 lines):
diff -r 42b312ce951f -r e88ec6cb0884 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:
changeset ed832ba2cbdd in /home/hg/repos/gajim
author: Yann Leboulanger <asterix(a)lagaule.org>
branches: gajim_0.16
details:http://hg.gajim.org/gajim?cmd=changeset;node=ed832ba2cbdd
description: Make threads usable under windows so GPG works correctly. Fixes #7565
diffstat:
src/gajim.py | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diffs (20 lines):
diff -r b2788bedd2a1 -r ed832ba2cbdd src/gajim.py
--- a/src/gajim.py Sat Nov 30 09:48:18 2013 +0100
+++ b/src/gajim.py Sat Nov 30 10:00:10 2013 +0100
@@ -509,13 +509,9 @@
interface.run()
try:
- if os.name != 'nt':
- # This makes Gajim unusable under windows, and threads are used only
- # for GPG, so not under windows
- gtk.gdk.threads_init()
- gtk.gdk.threads_enter()
+ gtk.gdk.threads_init()
+ gtk.gdk.threads_enter()
gtk.main()
- if os.name != 'nt':
- gtk.gdk.threads_leave()
+ gtk.gdk.threads_leave()
except KeyboardInterrupt:
print >> sys.stderr, 'KeyboardInterrupt'