Skip to content

Commit

Permalink
Use raw string in replace, to avoid deprecation warning (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronAtDuo committed Jun 30, 2022
1 parent 057ad6c commit dea8d14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion duo_client/https_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def _ValidateCertificateHostname(self, cert, hostname):
"""
hosts = self._GetValidHostsForCert(cert)
for host in hosts:
host_re = host.replace('.', '\.').replace('*', '[^.]*')
host_re = host.replace('.', r'\.').replace('*', '[^.]*')
if re.search('^%s$' % (host_re,), hostname, re.I):
return True
return False
Expand Down

0 comments on commit dea8d14

Please sign in to comment.