summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/stanzabase.py
diff options
context:
space:
mode:
authorNathan Fritz <nathan@andyet.net>2010-07-19 15:38:48 -0700
committerNathan Fritz <nathan@andyet.net>2010-07-19 15:38:48 -0700
commitfec8578cf61696d8ca85a6fe85a55be71d7109fd (patch)
treeefa425808db04a199e59d0b6fe5efa81c0e3d455 /sleekxmpp/xmlstream/stanzabase.py
parentf80b3285d49a2ca395369a98cb0f7cf1fda4e218 (diff)
downloadslixmpp-fec8578cf61696d8ca85a6fe85a55be71d7109fd.tar.gz
slixmpp-fec8578cf61696d8ca85a6fe85a55be71d7109fd.tar.bz2
slixmpp-fec8578cf61696d8ca85a6fe85a55be71d7109fd.tar.xz
slixmpp-fec8578cf61696d8ca85a6fe85a55be71d7109fd.zip
stanza should not have setValues/getValues because that conflicts with attribute accessors
Diffstat (limited to 'sleekxmpp/xmlstream/stanzabase.py')
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py
index 6508c0af..4e6afee4 100644
--- a/sleekxmpp/xmlstream/stanzabase.py
+++ b/sleekxmpp/xmlstream/stanzabase.py
@@ -241,7 +241,7 @@ class ElementBase(tostring.ToString):
def __eq__(self, other):
if not isinstance(other, ElementBase):
return False
- values = self.getValues()
+ values = self.getStanzaValues()
for key in other:
if key not in values or values[key] != other[key]:
return False
@@ -283,21 +283,21 @@ class ElementBase(tostring.ToString):
if child.tag == "{%s}%s" % (self.namespace, name):
self.xml.remove(child)
- def getValues(self):
+ def getStanzaValues(self):
out = {}
for interface in self.interfaces:
out[interface] = self[interface]
for pluginkey in self.plugins:
- out[pluginkey] = self.plugins[pluginkey].getValues()
+ out[pluginkey] = self.plugins[pluginkey].getStanzaValues()
if self.iterables:
iterables = []
for stanza in self.iterables:
- iterables.append(stanza.getValues())
+ iterables.append(stanza.getStanzaValues())
iterables[-1].update({'__childtag__': "{%s}%s" % (stanza.namespace, stanza.name)})
out['substanzas'] = iterables
return out
- def setValues(self, attrib):
+ def setStanzaValues(self, attrib):
for interface in attrib:
if interface == 'substanzas':
for subdict in attrib['substanzas']:
@@ -305,7 +305,7 @@ class ElementBase(tostring.ToString):
for subclass in self.subitem:
if subdict['__childtag__'] == "{%s}%s" % (subclass.namespace, subclass.name):
sub = subclass(parent=self)
- sub.setValues(subdict)
+ sub.setStanzaValues(subdict)
self.iterables.append(sub)
break
elif interface in self.interfaces:
@@ -313,7 +313,7 @@ class ElementBase(tostring.ToString):
elif interface in self.plugin_attrib_map and interface not in self.plugins:
self.initPlugin(interface)
if interface in self.plugins:
- self.plugins[interface].setValues(attrib[interface])
+ self.plugins[interface].setStanzaValues(attrib[interface])
return self
def appendxml(self, xml):