aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2020-12-08 23:27:04 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2020-12-08 23:29:46 +0100
commit6e2d94a1bdb076e7df0e0981f43420a6b4a3fb4c (patch)
tree5c5a5a71da5f93df0632d2b74725bcdc12600a2b
parent7b93190525618c7e5a3daafab092554cffb70307 (diff)
Rather use rconfig.has_option() instead
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)
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index ce1fcedd2..3258cc5c4 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -493,7 +493,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(