From 8b912cec489a96178fcac5667c03e20850149c3a Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Thu, 12 Jul 2018 05:34:54 +0200 Subject: Avoid duplicating tempest section in rally.conf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I79598cce2c7dfe0a2e969ddd32735c3eb189fa7a Signed-off-by: Cédric Ollivier --- functest/opnfv_tests/openstack/tempest/tempest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: -- cgit 1.2.3-korg