summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-06-20 23:46:13 -0700
committerLance Stout <lancestout@gmail.com>2012-06-20 23:46:13 -0700
commiteb5df1aa3722e6e85b9683805b4088f4340918aa (patch)
treeb2d0989f71dc0be91d22c3221b4be5d1918e1881 /sleekxmpp/xmlstream
parent546066d67713db06400f4c74814875d47d98670e (diff)
parent8a745c5e8101ee80fff88cf93e969fec5507ba2d (diff)
downloadslixmpp-eb5df1aa3722e6e85b9683805b4088f4340918aa.tar.gz
slixmpp-eb5df1aa3722e6e85b9683805b4088f4340918aa.tar.bz2
slixmpp-eb5df1aa3722e6e85b9683805b4088f4340918aa.tar.xz
slixmpp-eb5df1aa3722e6e85b9683805b4088f4340918aa.zip
Merge branch 'master' into develop
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py8
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py3
2 files changed, 7 insertions, 4 deletions
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
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.