equal
deleted
inserted
replaced
162 # print 'returning whois response' |
162 # print 'returning whois response' |
163 return response.decode() |
163 return response.decode() |
164 |
164 |
165 def choose_server(self, domain): |
165 def choose_server(self, domain): |
166 """Choose initial lookup NIC host""" |
166 """Choose initial lookup NIC host""" |
|
167 if type(domain) is not unicode: |
|
168 domain = domain.decode('utf-8').encode('idna') |
167 if (domain.endswith("-NORID")): |
169 if (domain.endswith("-NORID")): |
168 return NICClient.NORIDHOST |
170 return NICClient.NORIDHOST |
169 pos = domain.rfind('.') |
171 pos = domain.rfind('.') |
170 if (pos == -1): |
172 if (pos == -1): |
171 return None |
173 return None |