From f84a4ee4309d76200981c92896f28e8fa1bb8ad3 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 8 Dec 2015 07:19:31 -0600 Subject: [PATCH] Avoid DeprecationWarning from xml.etree.Element.getchildren() --- openmc/clean_xml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/clean_xml.py b/openmc/clean_xml.py index aefd30ac7b..564281a5cc 100644 --- a/openmc/clean_xml.py +++ b/openmc/clean_xml.py @@ -1,7 +1,7 @@ def sort_xml_elements(tree): # Retrieve all children of the root XML node in the tree - elements = tree.getchildren() + elements = list(tree) # Initialize empty lists for the sorted and comment elements sorted_elements = []