Handle experimental lookup method for bad domains
Attempting to use NICClient with bad domains could hit a bad logical path that
leads to an attempt to reference a variable that hasn't been defined. So in case
we don't manage to find a nichost for a domain, just set `result` to `None`
--- a/whois/whois.py Fri Oct 03 16:40:07 2014 +0200
+++ b/whois/whois.py Mon Nov 10 13:42:37 2014 +0200
@@ -206,6 +206,8 @@
nichost = self.choose_server(query_arg)
if (nichost is not None):
result = self.whois(query_arg, nichost, flags)
+ else:
+ result = ''
else:
result = self.whois(query_arg, options['whoishost'], flags)
# print 'whois_lookup finished'