summaryrefslogtreecommitdiff
path: root/nova/utils.py
diff options
context:
space:
mode:
authorStephen Finucane <sfinucan@redhat.com>2019-04-12 17:06:04 +0100
committerEric Fried <openstack@fried.cc>2019-06-24 14:24:06 -0500
commitdc6fc82c1424769e38ef6fff2ea01e718220b954 (patch)
treeeffaa307a57bd664318d204cddc8b014d4b68dfc /nova/utils.py
parent97b769ef536f4ba496e845f43c79a7f0655a17d3 (diff)
downloadnova-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.py2
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