From f1dec639de47c632ebcf9acc4f7e74ed57979a6f Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Wed, 17 May 2017 07:44:27 +0200 Subject: Conform constants.py with the minimal standards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It adds the shebang to constants.py and its dependencies and stops importing from a relative path. It stops printing obsolete values too. It adds python3 support to them by the way. Change-Id: Ie7bddcf253eb245844d9e11c17acc69943c1ba63 Signed-off-by: Cédric Ollivier --- functest/utils/config.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) mode change 100755 => 100644 functest/utils/config.py (limited to 'functest/utils/config.py') diff --git a/functest/utils/config.py b/functest/utils/config.py old mode 100755 new mode 100644 index b5b845010..d91f63ac2 --- a/functest/utils/config.py +++ b/functest/utils/config.py @@ -1,8 +1,11 @@ -import os +#!/usr/bin/env python +import os import yaml -import env +import six + +from functest.utils import env class Config(object): @@ -16,7 +19,7 @@ class Config(object): self._set_others() def _parse(self, attr_now, left_parametes): - for param_n, param_v in left_parametes.iteritems(): + for param_n, param_v in six.iteritems(left_parametes): attr_further = self._get_attr_further(attr_now, param_n) if attr_further: self.__setattr__(attr_further, param_v) @@ -32,8 +35,3 @@ class Config(object): CONF = Config() - -if __name__ == "__main__": - print CONF.vnf_cloudify_ims - print CONF.vnf_cloudify_ims_tenant_images - print CONF.vnf_cloudify_ims_tenant_images_centos_7 -- cgit 1.2.3-korg