aboutsummaryrefslogtreecommitdiffstats
path: root/tests/run_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run_tests.py')
-rwxr-xr-xtests/run_tests.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/run_tests.py b/tests/run_tests.py
index 7c48e268..012e173d 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -49,14 +49,14 @@ except ImportError:
def __get_endpoint_url(name="keystone"):
- with subprocess.Popen(["openstack", "endpoint", "show", name, "-f", "yaml"], stdout=subprocess.PIPE) as proc:
- y = yaml.load(proc.stdout.read())
- url = y['publicurl']
- url = url.replace("http://", "")
- url = url.replace("https://", "")
- host, port = url.split(":", maxsplit=1)
- port = port.split("/")[0]
- return host, port
+ proc = subprocess.Popen(["openstack", "endpoint", "show", name, "-f", "yaml"], stdout=subprocess.PIPE)
+ y = yaml.load(proc.stdout.read())
+ url = y['publicurl']
+ url = url.replace("http://", "")
+ url = url.replace("https://", "")
+ host, port = url.split(":")
+ port = port.split("/")[0]
+ return host, port
def test_federation():