diff options
author | Lance Stout <lancestout@gmail.com> | 2012-06-20 23:46:13 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-06-20 23:46:13 -0700 |
commit | eb5df1aa3722e6e85b9683805b4088f4340918aa (patch) | |
tree | b2d0989f71dc0be91d22c3221b4be5d1918e1881 /sleekxmpp/xmlstream/stanzabase.py | |
parent | 546066d67713db06400f4c74814875d47d98670e (diff) | |
parent | 8a745c5e8101ee80fff88cf93e969fec5507ba2d (diff) | |
download | slixmpp-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.py | 8 |
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 |