summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index a7d608bc3..ac69357a8 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -254,7 +254,8 @@ class TempestCommon(singlevm.VmReady1):
"""Set image name as tempest img_name_regex"""
rconfig = configparser.RawConfigParser()
rconfig.read(rally_conf)
- rconfig.add_section('tempest')
+ if not rconfig.has_section('tempest'):
+ rconfig.add_section('tempest')
rconfig.set('tempest', 'img_name_regex', '^{}$'.format(
self.image.name))
with open(rally_conf, 'wb') as config_file: