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/env.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'functest/utils/env.py') diff --git a/functest/utils/env.py b/functest/utils/env.py index 7e4df2ea5..c9629e153 100644 --- a/functest/utils/env.py +++ b/functest/utils/env.py @@ -1,6 +1,11 @@ +#!/usr/bin/env python + import os import re +import six + + default_envs = { 'NODE_NAME': 'unknown_pod', 'CI_DEBUG': 'false', @@ -17,9 +22,9 @@ default_envs = { class Environment(object): def __init__(self): - for k, v in os.environ.iteritems(): + for k, v in six.iteritems(os.environ): self.__setattr__(k, v) - for k, v in default_envs.iteritems(): + for k, v in six.iteritems(default_envs): if k not in os.environ: self.__setattr__(k, v) self._set_ci_run() -- cgit 1.2.3-korg