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: Ice98ff5f59e02452c1392f3b2048929764630674
This commit is contained in:
Hervé Beraud 2020-06-23 11:01:28 +02:00
parent 8de17cfe6f
commit ca2bab465d
1 changed files with 1 additions and 1 deletions

View File

@ -1002,7 +1002,7 @@ def _s3_parse_manifest(context, manifest):
'container_format': image_format})
image_parts = [
fn_element.text
for fn_element in manifest.find('image').getiterator('filename')]
for fn_element in manifest.find('image').iter('filename')]
encrypted_key = manifest.find('image/ec2_encrypted_key').text
encrypted_iv = manifest.find('image/ec2_encrypted_iv').text