summaryrefslogtreecommitdiff
path: root/sleekxmpp/stanza
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2010-01-08 01:45:11 +0000
committerNathan Fritz <fritzy@netflint.net>2010-01-08 01:45:11 +0000
commit8e3168e145da563cc0cca9762ff0c78b65425b73 (patch)
tree9bff7e4f6f798d3c0f5278776c63ae5d20c662fe /sleekxmpp/stanza
parentb54221f2a9f18d90136fda84c08e68eae6ef2a13 (diff)
downloadslixmpp-8e3168e145da563cc0cca9762ff0c78b65425b73.tar.gz
slixmpp-8e3168e145da563cc0cca9762ff0c78b65425b73.tar.bz2
slixmpp-8e3168e145da563cc0cca9762ff0c78b65425b73.tar.xz
slixmpp-8e3168e145da563cc0cca9762ff0c78b65425b73.zip
* added first stanza tests
* added stanza.keys() * stanza.getValues() now return substanzas and plugins * stanza.setValues() now can read substanzas and plugins * stanzas can now be iterable if stanza.subitem is set to a class
Diffstat (limited to 'sleekxmpp/stanza')
-rw-r--r--sleekxmpp/stanza/iq.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sleekxmpp/stanza/iq.py b/sleekxmpp/stanza/iq.py
index cec0f8bc..e3eccfdc 100644
--- a/sleekxmpp/stanza/iq.py
+++ b/sleekxmpp/stanza/iq.py
@@ -48,14 +48,14 @@ class Iq(RootStanza):
def setQuery(self, value):
query = self.xml.find("{%s}query" % value)
- if query is None:
+ if query is None and value:
self.clear()
query = ET.Element("{%s}query" % value)
self.xml.append(query)
return self
def getQuery(self):
- for child in self.getchildren():
+ for child in self.xml.getchildren():
if child.tag.endswith('query'):
ns =child.tag.split('}')[0]
if '{' in ns: