summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-08-19 19:14:18 -0400
committerLance Stout <lancestout@gmail.com>2010-08-19 19:14:18 -0400
commitb71cfe049285bf777b0e648cebb05c7da6c69e44 (patch)
treeaf31b9d69d4348a61fe782e6876a774847181ef7 /sleekxmpp
parentfac3bca1f6fd2412b52c3e7ce9b0971d8a290083 (diff)
downloadslixmpp-b71cfe049285bf777b0e648cebb05c7da6c69e44.tar.gz
slixmpp-b71cfe049285bf777b0e648cebb05c7da6c69e44.tar.bz2
slixmpp-b71cfe049285bf777b0e648cebb05c7da6c69e44.tar.xz
slixmpp-b71cfe049285bf777b0e648cebb05c7da6c69e44.zip
Small cleanup in ElementBase.__setitem__
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py
index fb8e6bee..dfa37368 100644
--- a/sleekxmpp/xmlstream/stanzabase.py
+++ b/sleekxmpp/xmlstream/stanzabase.py
@@ -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)