diff options
author | Stephen Finucane <sfinucan@redhat.com> | 2019-04-12 17:06:04 +0100 |
---|---|---|
committer | Eric Fried <openstack@fried.cc> | 2019-06-24 14:24:06 -0500 |
commit | dc6fc82c1424769e38ef6fff2ea01e718220b954 (patch) | |
tree | effaa307a57bd664318d204cddc8b014d4b68dfc /nova/utils.py | |
parent | 97b769ef536f4ba496e845f43c79a7f0655a17d3 (diff) | |
download | nova-dc6fc82c1424769e38ef6fff2ea01e718220b954.tar.gz |
hacking: Resolve W605 (invalid escape sequence)
This one's actually important since it will be an error in future
versions of Python.
Change-Id: Ib9f735216773224f91ac7f49fbe2eee119670872
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Diffstat (limited to 'nova/utils.py')
-rw-r--r-- | nova/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/utils.py b/nova/utils.py index 7f453cfca8..71d50f2d4b 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -515,7 +515,7 @@ def sanitize_hostname(hostname, default_name=None): hostname = truncate_hostname(hostname) hostname = re.sub('[ _]', '-', hostname) - hostname = re.sub('[^\w.-]+', '', hostname) + hostname = re.sub(r'[^\w.-]+', '', hostname) hostname = hostname.lower() hostname = hostname.strip('.-') # NOTE(eliqiao): set hostname to default_display_name to avoid |