diff options
author | Nathan Fritz <fritzy@netflint.net> | 2010-01-08 01:45:11 +0000 |
---|---|---|
committer | Nathan Fritz <fritzy@netflint.net> | 2010-01-08 01:45:11 +0000 |
commit | 8e3168e145da563cc0cca9762ff0c78b65425b73 (patch) | |
tree | 9bff7e4f6f798d3c0f5278776c63ae5d20c662fe /sleekxmpp/stanza/iq.py | |
parent | b54221f2a9f18d90136fda84c08e68eae6ef2a13 (diff) | |
download | slixmpp-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/iq.py')
-rw-r--r-- | sleekxmpp/stanza/iq.py | 4 |
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: |