From 2a78570d6551cb5f85fb79083d9bdddf7f86b3d6 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Wed, 20 Jun 2012 22:21:34 -0700 Subject: Fix setting IPv6 default configuration option. --- sleekxmpp/xmlstream/xmlstream.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sleekxmpp/xmlstream') diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index a1b6ccd6..321e2694 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -212,6 +212,9 @@ class XMLStream(object): #: proxy based on the settings in :attr:`proxy_config`. self.use_proxy = False + #: If set to ``True``, attempt to use IPv6. + self.use_ipv6 = True + #: An optional dictionary of proxy settings. It may provide: #: :host: The host offering proxy services. #: :port: The port for the proxy service. -- cgit v1.2.3 From 1ad171dfe54238f4235de67d7fc3c7eb1d8ec3c0 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Wed, 20 Jun 2012 23:19:52 -0700 Subject: Fix issue with setting subelements values with default langs. --- sleekxmpp/xmlstream/stanzabase.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sleekxmpp/xmlstream') diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py index 64e00626..88276ddf 100644 --- a/sleekxmpp/xmlstream/stanzabase.py +++ b/sleekxmpp/xmlstream/stanzabase.py @@ -1003,11 +1003,11 @@ class ElementBase(object): last_xml = element element = last_xml - if element.attrib.get('{%s}lang' % XML_NS, default_lang) != lang: - element = ET.Element(ename) - if lang: + if lang: + if element.attrib.get('{%s}lang' % XML_NS, default_lang) != lang: + element = ET.Element(ename) element.attrib['{%s}lang' % XML_NS] = lang - parent.append(element) + parent.append(element) element.text = text return element -- cgit v1.2.3