Skip to content

Commit

Permalink
lisa: Fixes problem with removing children while iterating (#5216)
Browse files Browse the repository at this point in the history
Fixes #5215
  • Loading branch information
AryazE committed Mar 25, 2024
1 parent 4aaace2 commit a8187a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion translate/misc/xml_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,6 @@ def clear_content(node):
Unlike clear() this is not removing attributes.
"""
for child in node:
for child in node.iterchildren(reversed=True):
node.remove(child)
node.text = None

0 comments on commit a8187a4

Please sign in to comment.