diff options
| author | Endre Karlson <endre.karlson@hp.com> | 2014-02-25 14:28:28 +0100 |
|---|---|---|
| committer | Endre Karlson <endre.karlson@hp.com> | 2014-02-25 14:39:12 +0100 |
| commit | c6542d44378afe1727deeca3f34be9bc98edde0c (patch) | |
| tree | bd5556547b2288d5e80205367263869a3aedca16 | |
| parent | b9e48a4e3ffe1226353c08cb09305cd7d7200b3c (diff) | |
| download | python-designateclient-c6542d44378afe1727deeca3f34be9bc98edde0c.tar.gz | |
Ensure that url stripping is done correctly1.0.2
Change-Id: I9c50674f95ab849e4eaceefd05e3a8e770a86c3a
Closes-Bug: #1284640
| -rw-r--r-- | designateclient/auth.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/designateclient/auth.py b/designateclient/auth.py index 8f1e1e2..b3892e4 100644 --- a/designateclient/auth.py +++ b/designateclient/auth.py @@ -85,7 +85,10 @@ class KeystoneAuth(AuthBase): # NOTE(kiall): The Version 1 API is the only API that has ever included # the version number in the endpoint. Thus, it's safe to # simply remove it if present. - return url.rstrip('/').rstrip('v1').rstrip('/') + url = url.rstrip('/') + if url.endswith('/v1'): + url = url[:-3] + return url def refresh_auth(self): ks = self.get_ksclient() |
