Remove elementtree deprecated methods
All our supported runtimes [1] are compatible with the recommended alternatives. `Element.getchildren` [2] is deprecated since python 3.2 and will be removed in python 3.9, these changes switch usages to `list(elem)`. [1] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-train [2] https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.getchildren Change-Id: I3ef75bcb5550b86c0a6702e186b4d285b64af182
This commit is contained in:
parent
2f54c4d654
commit
20913a41b9
@ -62,7 +62,7 @@ class NagiosParser(object):
|
||||
return services
|
||||
|
||||
def _parse_service_row(self, service_row):
|
||||
columns = service_row.getchildren()
|
||||
columns = list(service_row)
|
||||
|
||||
# service lines have a fixed number of columns.
|
||||
# there are also two blank lines between different hosts,
|
||||
|
Loading…
Reference in New Issue
Block a user