diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2017-02-14 00:10:06 +0100 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2017-02-14 00:10:06 +0100 |
commit | 2c317ad4c5a21bbdcaab4eef383ce26448364be6 (patch) | |
tree | 2b271475072d8b44abf00de0fe6ad0ff71e8f330 | |
parent | 4f488f1e387b7e56bb7ff21f17e76781976bd057 (diff) |
Bugfix: remove double quotes from environment variables
JIRA: FUNCTEST-724
Change-Id: Iae248d710813a241752e1a06fb87d650caf3d188
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
-rwxr-xr-x | functest/utils/openstack_utils.py | 3 |
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 |