summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/stanzabase.py
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/stanzabase.py
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/stanzabase.py')
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py8
1 files changed, 4 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