summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-02-19 20:27:53 -0800
committerLance Stout <lancestout@gmail.com>2012-02-19 20:27:53 -0800
commitecd6ad69303466029e6498f9927964d9ee9e631b (patch)
treecc5a178d1ff19cf738a08feb7bc9da576c40efe0 /sleekxmpp/xmlstream
parentc36073b40e2caef337511fa3a4e386dce5449bd2 (diff)
downloadslixmpp-ecd6ad69303466029e6498f9927964d9ee9e631b.tar.gz
slixmpp-ecd6ad69303466029e6498f9927964d9ee9e631b.tar.bz2
slixmpp-ecd6ad69303466029e6498f9927964d9ee9e631b.tar.xz
slixmpp-ecd6ad69303466029e6498f9927964d9ee9e631b.zip
Fix incompatibility with clearing an element between ElementTree and cElementTree
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py
index 648f8603..96b4f181 100644
--- a/sleekxmpp/xmlstream/stanzabase.py
+++ b/sleekxmpp/xmlstream/stanzabase.py
@@ -961,8 +961,9 @@ class ElementBase(object):
Any attribute values will be preserved.
"""
- for child in self.xml.getchildren():
+ for child in list(self.xml):
self.xml.remove(child)
+
for plugin in list(self.plugins.keys()):
del self.plugins[plugin]
return self