diff options
author | Lance Stout <lancestout@gmail.com> | 2012-02-19 20:27:53 -0800 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-02-19 20:27:53 -0800 |
commit | ecd6ad69303466029e6498f9927964d9ee9e631b (patch) | |
tree | cc5a178d1ff19cf738a08feb7bc9da576c40efe0 /sleekxmpp/xmlstream/stanzabase.py | |
parent | c36073b40e2caef337511fa3a4e386dce5449bd2 (diff) | |
download | slixmpp-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/stanzabase.py')
-rw-r--r-- | sleekxmpp/xmlstream/stanzabase.py | 3 |
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 |