From 2ffb0a1ad31ce8e2ba0b6720857c48c691948c5f Mon Sep 17 00:00:00 2001 From: JordanP Date: Fri, 4 Jul 2014 16:43:52 +0200 Subject: [PATCH] Ensure no double slash in get token URL Before appending a slash to an URL, we should make sure that the url doesn't already have one at the end. Change-Id: Iff864d9b49cf3e3138f602a2c6615ed742f35698 Closes-Bug: 1337880 --- keystoneclient/auth/identity/v2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keystoneclient/auth/identity/v2.py b/keystoneclient/auth/identity/v2.py index a421c6726..2b0757cf0 100644 --- a/keystoneclient/auth/identity/v2.py +++ b/keystoneclient/auth/identity/v2.py @@ -43,7 +43,7 @@ class Auth(base.BaseIdentityPlugin): def get_auth_ref(self, session, **kwargs): headers = {'Accept': 'application/json'} - url = self.auth_url + '/tokens' + url = self.auth_url.rstrip('/') + '/tokens' params = {'auth': self.get_auth_data(headers)} if self.tenant_id: