From 2c317ad4c5a21bbdcaab4eef383ce26448364be6 Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Tue, 14 Feb 2017 00:10:06 +0100 Subject: Bugfix: remove double quotes from environment variables JIRA: FUNCTEST-724 Change-Id: Iae248d710813a241752e1a06fb87d650caf3d188 Signed-off-by: jose.lausuch --- functest/utils/openstack_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'functest/utils/openstack_utils.py') diff --git a/functest/utils/openstack_utils.py b/functest/utils/openstack_utils.py index a0d78ae94..c21ed818e 100755 --- a/functest/utils/openstack_utils.py +++ b/functest/utils/openstack_utils.py @@ -114,7 +114,8 @@ def get_credentials(other_creds={}): def source_credentials(rc_file): with open(rc_file, "r") as f: for line in f: - var = line.rstrip('"\n').replace('export ', '').split("=") + var = line.rstrip('"\n').replace( + 'export ', '').replace("'", "").split("=") key = re.sub(r'^ *| *$', '', var[0]) value = re.sub(r'^[" ]*|[ "]*$', '', "".join(var[1:])) os.environ[key] = value -- cgit 1.2.3-korg