aboutsummaryrefslogtreecommitdiffstats
path: root/functest/ci/prepare_env.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2017-02-08 17:48:47 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2017-02-09 21:36:49 +0100
commiteb0151059dcc1efff797eeeb9f0e77e344426ef6 (patch)
tree4e5e0032ded12c2817bc5ec587f187db9e7e7272 /functest/ci/prepare_env.py
parenta34f23295ba75694d2837687df3ada5541489a25 (diff)
Fix source_credentials in openstack_utils
It fixes issues raised when an env var contains '=' (e.g. LS_COLORS). It now exports the vars listed in rc_file without creating a new process. Change-Id: I6e6a4e3ab9c45afe4d40015831acb283acbe564c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/ci/prepare_env.py')
-rwxr-xr-xfunctest/ci/prepare_env.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/functest/ci/prepare_env.py b/functest/ci/prepare_env.py
index b3e59020..cca9ac73 100755
--- a/functest/ci/prepare_env.py
+++ b/functest/ci/prepare_env.py
@@ -170,12 +170,10 @@ def source_rc_file():
sys.exit(1)
logger.info("Sourcing the OpenStack RC file...")
- creds = os_utils.source_credentials(
+ os_utils.source_credentials(
CONST.openstack_creds)
- str = ""
- for key, value in creds.iteritems():
+ for key, value in os.environ.iteritems():
if re.search("OS_", key):
- str += "\n\t\t\t\t\t\t " + key + "=" + value
if key == 'OS_AUTH_URL':
CONST.OS_AUTH_URL = value
elif key == 'OS_USERNAME':