From f020d4fba1b344adb95867b4227618b59b97468c Mon Sep 17 00:00:00 2001
From: =?utf8?q?C=C3=A9dric=20Ollivier?= <cedric.ollivier@orange.com>
Date: Tue, 8 Dec 2020 23:27:04 +0100
Subject: [PATCH] Rather use rconfig.has_option() instead
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

It slightly increases py2 and py3 to ease next backports.

Change-Id: I168044d85469e92f970e983f4bdfe627d3763e61
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 859359c0a4b2afce87beb8ad34fb72c1e3241d4b)
---
 functest/opnfv_tests/openstack/tempest/tempest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index bf4ffcf9d..91ce4573b 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -500,7 +500,7 @@ class TempestCommon(singlevm.VmReady2):
             rconfig.add_section("auth")
         if env.get("NEW_USER_ROLE").lower() != "member":
             tempest_roles = []
-            if "tempest_roles" in rconfig["auth"]:
+            if rconfig.has_option("auth", "tempest_roles"):
                 tempest_roles = functest_utils.convert_ini_to_list(
                     rconfig.get("auth", "tempest_roles"))
             rconfig.set(
-- 
2.16.6