diff options
Diffstat (limited to 'functest')
-rw-r--r-- | functest/opnfv_tests/openstack/vping/vping_userdata.py | 6 | ||||
-rw-r--r-- | functest/utils/functest_utils.py | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/functest/opnfv_tests/openstack/vping/vping_userdata.py b/functest/opnfv_tests/openstack/vping/vping_userdata.py index 225c167d5..9010895cb 100644 --- a/functest/opnfv_tests/openstack/vping/vping_userdata.py +++ b/functest/opnfv_tests/openstack/vping/vping_userdata.py @@ -79,13 +79,13 @@ class VPingUserdata(singlevm.VmReady2): self.logger.info("vPing detected!") exit_code = testcase.TestCase.EX_OK break - elif "failed to read iid from metadata" in p_console or tries > 5: + if "failed to read iid from metadata" in p_console or tries > 5: self.logger.info("Failed to read iid from metadata") break - elif sec == getattr(config.CONF, 'vping_ping_timeout'): + if sec == getattr(config.CONF, 'vping_ping_timeout'): self.logger.info("Timeout reached.") break - elif sec % 10 == 0: + if sec % 10 == 0: if "request failed" in p_console: self.logger.debug( "It seems userdata is not supported in nova boot. " diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py index a1434adc2..a9c9e5e72 100644 --- a/functest/utils/functest_utils.py +++ b/functest/utils/functest_utils.py @@ -207,7 +207,7 @@ def convert_ini_to_dict(value): "Convert oslo.conf input to dict" assert isinstance(value, str) try: - return {k: v for k, v in (x.rsplit(':', 1) for x in value.split(','))} + return dict((x.rsplit(':', 1) for x in value.split(','))) except ValueError: return {} @@ -217,4 +217,4 @@ def convert_ini_to_list(value): assert isinstance(value, str) if not value: return [] - return [x for x in value.split(',')] + return list(value.split(',')) |