From e4582400babaea8bc1340ea2dbfb907cea960e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Tue, 23 Jun 2020 10:59:01 +0200 Subject: [PATCH] Remove lxml deprecated methods All our supported runtimes [1] are compatible with the recommended alternatives. The `getchildren` method is deprecated [2] since lxml 2.0 and will be removed in future versions, these changes switch usages to `list(elem)` as recommended in the official documentation [2]. [1] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-train [2] https://lxml.de/api/lxml.etree._Element-class.html#getchildren Change-Id: Ida46f789d1b751d617b3b06e8a192a5031452567 --- cinder/volume/drivers/zadara.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cinder/volume/drivers/zadara.py b/cinder/volume/drivers/zadara.py index 98699de1052..02124ee6853 100644 --- a/cinder/volume/drivers/zadara.py +++ b/cinder/volume/drivers/zadara.py @@ -368,7 +368,7 @@ class ZadaraVPSAISCSIDriver(driver.ISCSIDriver): result_list = [] key, value = search_tuple - for child_object in objects.getchildren(): + for child_object in list(objects): found_value = child_object.findtext(key) if found_value and (found_value == value or value is None): if first: