diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-11-06 10:51:27 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-11-06 15:07:43 +0100 |
commit | 925fd67983d97b16022620ef4c51a70ecf639f2a (patch) | |
tree | 9c191c1bc784cd3be0dfa04d72412aec7dd38ab2 | |
parent | 79978853fea1eef900db1fe873d77636882183be (diff) |
Protect vs exceptions when ext_nets is empty
Otherwise several exceptions are raised in TestCase constructors
(those defined in heathcheck).
Change-Id: I4cb054f7092ea9db02cb8c4469e99848533c556b
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit e491334942083a81dab0f3450a809e29b0687c31)
-rw-r--r-- | functest/opnfv_tests/openstack/snaps/snaps_utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/functest/opnfv_tests/openstack/snaps/snaps_utils.py b/functest/opnfv_tests/openstack/snaps/snaps_utils.py index 956b104ac..c3cd6245e 100644 --- a/functest/opnfv_tests/openstack/snaps/snaps_utils.py +++ b/functest/opnfv_tests/openstack/snaps/snaps_utils.py @@ -16,7 +16,7 @@ def get_ext_net_name(os_creds): """ neutron = neutron_utils.neutron_client(os_creds) ext_nets = neutron_utils.get_external_networks(neutron) - return ext_nets[0].name + return ext_nets[0].name if ext_nets else "" def get_active_compute_cnt(os_creds): |