diff options
Diffstat (limited to 'functest/utils/openstack_utils.py')
-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 a0d78ae9..c21ed818 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 |