From 3cd6922815fbe54235c345718977c2c33fa0db81 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 26 Apr 2005 21:33:01 +0000 Subject: [PATCH] fix some typos --- src/common/GnuPG.py | 1 + src/common/connection.py | 10 +++++----- src/common/xmpp/protocol.py | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/common/GnuPG.py b/src/common/GnuPG.py index 6a9426f15..0c254d868 100644 --- a/src/common/GnuPG.py +++ b/src/common/GnuPG.py @@ -171,6 +171,7 @@ else: def _stripHeaderFooter(self, data): """Remove header and footer from data""" + if not data: return '' lines = data.split('\n') while lines[0] != '': lines.remove(lines[0]) diff --git a/src/common/connection.py b/src/common/connection.py index 563bcbf47..9380b04bf 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -398,11 +398,11 @@ class Connection: iq_obj.setTo(f) iq_obj.setType('result') qp = iq_obj.getTag('query') - qp.insertTag('name').insertData('Gajim') - qp.insertTag('version').insertData(gajim.version) + qp.setTagData('name', 'Gajim') + qp.setTagData('version', gajim.version) send_os = gajim.config.get('send_os_info') if send_os: - qp.insertTag('os').insertData(get_os_info()) + qp.setTagData('os', get_os_info()) self.connection.send(iq_obj) def _VersionResultCB(self, con, iq_obj): @@ -612,7 +612,7 @@ class Connection: p = common.xmpp.Presence(typ = ptype, priority = prio, show =\ status, status=msg) if signed: - presence.setTag(common.xmpp.NS_SIGNED + ' x').insertData(signed) + p.setTag(common.xmpp.NS_SIGNED + ' x').setData(signed) self.connection.send(p) self.dispatch('STATUS', status) @@ -636,7 +636,7 @@ class Connection: prio = str(gajim.config.get_per('accounts', self.name, 'priority')) p = common.xmpp.Presence(typ = ptype, priority = prio, show = status,\ status = msg) - if signed: presence.setTag(common.xmpp.NS_SIGNED + ' x').insertData( + if signed: presence.setTag(common.xmpp.NS_SIGNED + ' x').setData( signed) self.connection.send(p) self.dispatch('STATUS', status) diff --git a/src/common/xmpp/protocol.py b/src/common/xmpp/protocol.py index 87832cb51..afc6f4033 100644 --- a/src/common/xmpp/protocol.py +++ b/src/common/xmpp/protocol.py @@ -34,6 +34,7 @@ NS_DELAY ='jabber:x:delay' NS_DIALBACK ='jabber:server:dialback' NS_DISCO_INFO ='http://jabber.org/protocol/disco#info' NS_DISCO_ITEMS ='http://jabber.org/protocol/disco#items' +NS_ENCRYPTED ='jabber:x:encrypted' # JEP-0027 NS_GROUPCHAT ='gc-1.0' NS_IBB ='http://jabber.org/protocol/ibb' NS_INVISIBLE ='presence-invisible' # jabberd2 @@ -54,7 +55,7 @@ NS_SASL ='urn:ietf:params:xml:ns:xmpp-sasl' NS_SEARCH ='jabber:iq:search' NS_SERVER ='jabber:server' NS_SESSION ='urn:ietf:params:xml:ns:xmpp-session' -NS_SIGNED = "jabber:x:signed" # JEP-0027 +NS_SIGNED ='jabber:x:signed' # JEP-0027 NS_STANZAS ='urn:ietf:params:xml:ns:xmpp-stanzas' NS_STREAMS ='http://etherx.jabber.org/streams' NS_TIME ='jabber:iq:time'