whois/whois.py
branchleotop/whoispy-fix-python3-error-if-bwith-xxx-i-1463323526280
changeset 90 f1bcf8940a97
parent 82 fc40924ac59b
child 97 44522cd37b07
equal deleted inserted replaced
82:fc40924ac59b 90:f1bcf8940a97
   119             print('Socket Error:', socketerror)
   119             print('Socket Error:', socketerror)
   120             return ''
   120             return ''
   121         else:
   121         else:
   122             nhost = None
   122             nhost = None
   123             response = response.decode('utf-8', errors='replace')
   123             response = response.decode('utf-8', errors='replace')
   124             if b'with "=xxx"' in response:
   124             if 'with "=xxx"' in response:
   125                 return self.whois(query, hostname, flags, True)
   125                 return self.whois(query, hostname, flags, True)
   126             if flags & NICClient.WHOIS_RECURSE and nhost is None:
   126             if flags & NICClient.WHOIS_RECURSE and nhost is None:
   127                 nhost = self.findwhois_server(response, hostname, query)
   127                 nhost = self.findwhois_server(response, hostname, query)
   128             if nhost is not None:
   128             if nhost is not None:
   129                 response += self.whois(query, nhost, 0)
   129                 response += self.whois(query, nhost, 0)