mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +00:00
Small cleanup in ElementBase.__setitem__
This commit is contained in:
parent
fac3bca1f6
commit
b71cfe0492
1 changed files with 3 additions and 2 deletions
|
@ -254,8 +254,9 @@ class ElementBase(object):
|
|||
"""
|
||||
if attrib in self.interfaces:
|
||||
if value is not None:
|
||||
if hasattr(self, "set%s" % attrib.title()):
|
||||
getattr(self, "set%s" % attrib.title())(value,)
|
||||
set_method = "set%s" % attrib.title()
|
||||
if hasattr(self, set_method):
|
||||
getattr(self, set_method)(value,)
|
||||
else:
|
||||
if attrib in self.sub_interfaces:
|
||||
return self._setSubText(attrib, text=value)
|
||||
|
|
Loading…
Reference in a new issue