summaryrefslogtreecommitdiffstats
path: root/functest/utils
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2017-02-14 00:10:06 +0100
committerjose.lausuch <jose.lausuch@ericsson.com>2017-02-14 00:10:06 +0100
commit2c317ad4c5a21bbdcaab4eef383ce26448364be6 (patch)
tree2b271475072d8b44abf00de0fe6ad0ff71e8f330 /functest/utils
parent4f488f1e387b7e56bb7ff21f17e76781976bd057 (diff)
Bugfix: remove double quotes from environment variables
JIRA: FUNCTEST-724 Change-Id: Iae248d710813a241752e1a06fb87d650caf3d188 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'functest/utils')
-rwxr-xr-xfunctest/utils/openstack_utils.py3
1 files changed, 2 insertions, 1 deletions
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