diff options
| author | Eric Harney <eharney@redhat.com> | 2017-07-31 11:57:44 -0400 |
|---|---|---|
| committer | Eric Harney <eharney@redhat.com> | 2017-07-31 11:58:41 -0400 |
| commit | 1868200e9c1554f58ef06644890787921c0879cb (patch) | |
| tree | 19ca2bf91798783e74cd0d60da200e5f50a09999 /glanceclient | |
| parent | 6fe3018de8564a20865d9350bc942e8e14296d85 (diff) | |
| download | python-glanceclient-1868200e9c1554f58ef06644890787921c0879cb.tar.gz | |
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
Diffstat (limited to 'glanceclient')
| -rw-r--r-- | glanceclient/common/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
