mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-27 19:19:54 +00:00
Fix incompatibility with clearing an element between ElementTree and cElementTree
This commit is contained in:
parent
c36073b40e
commit
ecd6ad6930
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue