Skip to content

Commit 2a28bdc

Browse files
committed
Fixed syntax warnings
1 parent 2511d6b commit 2a28bdc

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

sipsimple/account/bonjour/_bonjour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1892,7 +1892,7 @@ def DNSServiceConstructFullName(
18921892
domain = _NO_DEFAULT,
18931893
):
18941894

1895-
"""
1895+
r"""
18961896
18971897
Concatenate a three-part domain name (as returned by a callback
18981898
function) into a properly-escaped full domain name. Note that

sipsimple/lookup-gevent.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def lookup_service(self, uri, service, timeout=3.0, lifetime=15.0):
175175

176176
try:
177177
# If the host part of the URI is an IP address, we will not do any lookup
178-
if re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", uri.host.decode()):
178+
if re.match(r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", uri.host.decode()):
179179
return [(uri.host.decode(), uri.port or service_port)]
180180

181181
resolver = DNSResolver()
@@ -232,7 +232,7 @@ def lookup_sip_proxy(self, uri, supported_transports, timeout=3.0, lifetime=15.0
232232
try:
233233
# If the host part of the URI is an IP address, we will not do any lookup
234234
transport = uri.transport.decode() if isinstance(uri.transport, bytes) else uri.transport
235-
if re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", uri.host.decode()):
235+
if re.match(r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", uri.host.decode()):
236236
transport = 'tls' if uri.secure else transport.lower()
237237
if transport not in supported_transports:
238238
raise DNSLookupError("IP transport %s dictated by URI is not supported" % transport)
@@ -325,7 +325,7 @@ def lookup_xcap_server(self, uri, timeout=3.0, lifetime=15.0):
325325

326326
try:
327327
# If the host part of the URI is an IP address, we cannot not do any lookup
328-
if re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", uri.host.decode()):
328+
if re.match(r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", uri.host.decode()):
329329
raise DNSLookupError("Cannot perform DNS query because the host is an IP address")
330330

331331
resolver = DNSResolver()

0 commit comments

Comments
 (0)