@@ -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