Fix WHOIS library not to puke on strange IP addresses
[selectricity-live] / app / views / quickvote / list_voters.rhtml
index 1672499f0a3b38af7fe185ee5e750e4a5b703667..695794fc3f536d4776897b845b0460b548ba4086 100644 (file)
             voter.ipaddress =~ /^172\.[1-3]/
             %>
             <% w=nil
+            puts "WHOIS #{voter.ipaddress}"
             if Cache and w=Cache.get("WHOIS:#{voter.ipaddress}")
             elsif Cache
-              w= Whois::Whois.new(IPAddr.new(voter.ipaddress),true)
+              puts "CREATE"
+              w= Whois::Whois.new(IPAddr.new(voter.ipaddress),false)
+              puts "SEARCH"
               w.search_whois
+              puts "DONE"
               Cache.set("WHOIS:#{voter.ipaddress}", w)
             else
-              w= Whois::Whois.new(IPAddr.new(voter.ipaddress),true)
+              w= Whois::Whois.new(IPAddr.new(voter.ipaddress),false)
               w.search_whois
             end
             

Benjamin Mako Hill || Want to submit a patch?