From 1868200e9c1554f58ef06644890787921c0879cb Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Mon, 31 Jul 2017 11:57:44 -0400 Subject: 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 --- glanceclient/common/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'glanceclient') diff --git a/glanceclient/common/utils.py b/glanceclient/common/utils.py index d194e65..b61913e 100644 --- a/glanceclient/common/utils.py +++ b/glanceclient/common/utils.py @@ -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 -- cgit v1.2.1