From 86fbe9927685d7a7f69d9a86efaa01305607b2d8 Mon Sep 17 00:00:00 2001 From: Etienne Champetier Date: Mon, 16 Nov 2020 12:59:50 -0500 Subject: [PATCH] Fix error with python 3.9 AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren' getchildren() has been removed in python 3.9 Signed-off-by: Etienne Champetier --- hpilo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hpilo.py b/hpilo.py index 30e09e1b..d71e1662 100644 --- a/hpilo.py +++ b/hpilo.py @@ -684,7 +684,7 @@ def _element_to_dict(self, element): retval[key.lower()] = self._coerce(val) if list(element): fields = [] - for child in element.getchildren(): + for child in element: if child.tag == 'FIELD': fields.append(self._element_to_dict(child)) if fields: