Remove elementtree deprecated methods
All our supported runtimes [1] are compatible with the recommended alternatives. `Element.getiterator` [2] is deprecated since python 3.2 and will be removed in python 3.9, these changes switch usages to Element.iter() [3] [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.getiterator [3] https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.iter Change-Id: Iaf5291698d866c9c86cda0f255799d8f10fff3dd
This commit is contained in:
@@ -235,7 +235,7 @@ class OFConfigClient(app_manager.OSKenApp):
|
||||
self._validate(tree)
|
||||
|
||||
name_spaces = set()
|
||||
for e in tree.getiterator():
|
||||
for e in tree.iter():
|
||||
name_spaces.add(capable_switch.get_ns_tag(e.tag)[0])
|
||||
print(name_spaces)
|
||||
|
||||
|
Reference in New Issue
Block a user