Merge "Fix python 3.6 escape char warning"

This commit is contained in:
Zuul 2018-04-09 13:17:56 +00:00 committed by Gerrit Code Review
commit 3ceba79042
1 changed files with 1 additions and 1 deletions

View File

@ -380,7 +380,7 @@ def strip_version(endpoint):
(scheme, netloc, path, __, __, __) = url_parts
path = path.lstrip('/')
# regex to match 'v1' or 'v2.0' etc
if re.match('v\d+\.?\d*', path):
if re.match(r'v\d+\.?\d*', path):
version = float(path.lstrip('v'))
endpoint = scheme + '://' + netloc
return endpoint, version