Fix python 3.6 escape char warning
In python 3.6, escape sequences that are not recognized in string literals issue DeprecationWarnings. Convert these to raw strings. Change-Id: I508a9147b932e219069eeee756bcbc43c7e961c5
This commit is contained in:
parent
6fe3018de8
commit
1868200e9c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue