diff options
author | Lance Stout <lancestout@gmail.com> | 2014-08-21 10:05:42 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2014-08-21 10:05:42 -0700 |
commit | aabec8b993748866b9cf3f09ebb7ae7ce2ddc426 (patch) | |
tree | 94c4fb419567f86ca62db5ad936ce00505891081 /sleekxmpp/xmlstream/stanzabase.py | |
parent | e5e2fbb16b4d9c11fc676925c6a13943282a3c66 (diff) | |
download | slixmpp-aabec8b993748866b9cf3f09ebb7ae7ce2ddc426.tar.gz slixmpp-aabec8b993748866b9cf3f09ebb7ae7ce2ddc426.tar.bz2 slixmpp-aabec8b993748866b9cf3f09ebb7ae7ce2ddc426.tar.xz slixmpp-aabec8b993748866b9cf3f09ebb7ae7ce2ddc426.zip |
Fix some more Unicode in **kwargs issues in Py2.6
Diffstat (limited to 'sleekxmpp/xmlstream/stanzabase.py')
-rw-r--r-- | sleekxmpp/xmlstream/stanzabase.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py index c6ed4163..11c8dd67 100644 --- a/sleekxmpp/xmlstream/stanzabase.py +++ b/sleekxmpp/xmlstream/stanzabase.py @@ -19,6 +19,7 @@ import logging import weakref from xml.etree import cElementTree as ET +from sleekxmpp.util import safedict from sleekxmpp.xmlstream import JID from sleekxmpp.xmlstream.tostring import tostring from sleekxmpp.thirdparty import OrderedDict @@ -679,6 +680,8 @@ class ElementBase(object): if lang and attrib in self.lang_interfaces: kwargs['lang'] = lang + kwargs = safedict(kwargs) + if attrib == 'substanzas': return self.iterables elif attrib in self.interfaces or attrib == 'lang': @@ -755,6 +758,8 @@ class ElementBase(object): if lang and attrib in self.lang_interfaces: kwargs['lang'] = lang + kwargs = safedict(kwargs) + if attrib in self.interfaces or attrib == 'lang': if value is not None: set_method = "set_%s" % attrib.lower() @@ -841,6 +846,8 @@ class ElementBase(object): if lang and attrib in self.lang_interfaces: kwargs['lang'] = lang + kwargs = safedict(kwargs) + if attrib in self.interfaces or attrib == 'lang': del_method = "del_%s" % attrib.lower() del_method2 = "del%s" % attrib.title() |