fixed python 3 byte error
authorrichardpenman
Mon, 05 Feb 2018 14:43:20 -0500
changeset 160 c385321ec3e4
parent 159 3b39f61b8a81
child 163 faaa3ce1af3e
fixed python 3 byte error
whois/whois.py
--- a/whois/whois.py	Mon Feb 05 14:40:21 2018 -0500
+++ b/whois/whois.py	Mon Feb 05 14:43:20 2018 -0500
@@ -75,7 +75,7 @@
         whois server for getting contact details.
         """
         nhost = None
-        match = re.compile('Domain Name: ' + query + '\s*.*?Whois Server: (.*?)\s', flags=re.IGNORECASE|re.DOTALL).search(buf)
+        match = re.compile('Domain Name: {}\s*.*?Whois Server: (.*?)\s'.format(query), flags=re.IGNORECASE|re.DOTALL).search(buf)
         if match:
             nhost = match.groups()[0]
             # if the whois address is domain.tld/something then