mirror of
https://github.com/django/daphne.git
synced 2024-11-21 15:36:33 +03:00
Fix deprecated regex escape sequence. (#266)
This commit is contained in:
parent
f46c2448b1
commit
ffd949f2ce
|
@ -8,7 +8,7 @@ def build_endpoint_description_strings(
|
|||
"""
|
||||
socket_descriptions = []
|
||||
if host and port is not None:
|
||||
host = host.strip("[]").replace(":", "\:")
|
||||
host = host.strip("[]").replace(":", r"\:")
|
||||
socket_descriptions.append("tcp:port=%d:interface=%s" % (int(port), host))
|
||||
elif any([host, port]):
|
||||
raise ValueError("TCP binding requires both port and host kwargs.")
|
||||
|
|
Loading…
Reference in New Issue
Block a user