Fix some more Unicode in **kwargs issues in Py2.6
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user