Skip to content

Commit f84a4ee

Browse files
committed
Avoid DeprecationWarning from xml.etree.Element.getchildren()
1 parent 9cde4ce commit f84a4ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openmc/clean_xml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
def sort_xml_elements(tree):
22

33
# Retrieve all children of the root XML node in the tree
4-
elements = tree.getchildren()
4+
elements = list(tree)
55

66
# Initialize empty lists for the sorted and comment elements
77
sorted_elements = []

0 commit comments

Comments
 (0)