projects
/
selectricity-live
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ee7a5c7
)
Add a fix for a NoMethodError when WHOIS/DNS server(s) time out.
author
John Dong
<jdong@mit.edu>
Tue, 21 Aug 2007 17:49:04 +0000
(13:49 -0400)
committer
John Dong
<jdong@mit.edu>
Tue, 21 Aug 2007 17:49:04 +0000
(13:49 -0400)
app/views/quickvote/results.rhtml
patch
|
blob
|
history
diff --git
a/app/views/quickvote/results.rhtml
b/app/views/quickvote/results.rhtml
index 2999e6b1bd1d150925387911221b77631503f841..6c1130f5e56b560ecd03989baf9b6b69406bce72 100644
(file)
--- a/
app/views/quickvote/results.rhtml
+++ b/
app/views/quickvote/results.rhtml
@@
-158,7
+158,7
@@
by several other names.</p>
<td><% begin %>
<% raise ArgumentError.new, "Local Server" if voter.ipaddress == "127.0.0.1" %>
<% raise ArgumentError.new, "XML-RPC Voter" if voter.ipaddress == "XMLRPC Request" %>
<td><% begin %>
<% raise ArgumentError.new, "Local Server" if voter.ipaddress == "127.0.0.1" %>
<% raise ArgumentError.new, "XML-RPC Voter" if voter.ipaddress == "XMLRPC Request" %>
- <% w= Whois::Whois.new(IPAddr.new(voter.ipaddress)
.to_s
,true)%>
+ <% w= Whois::Whois.new(IPAddr.new(voter.ipaddress),true)%>
<%=h((w.host == nil or w.host.empty?) ? voter.ipaddress : w.host)%>
</td>
<td>
<%=h((w.host == nil or w.host.empty?) ? voter.ipaddress : w.host)%>
</td>
<td>
@@
-169,6
+169,10
@@
by several other names.</p>
<%=h err %>
</td>
<td><%=h err%>
<%=h err %>
</td>
<td><%=h err%>
+ <% rescue NoMethodError %>
+ DNS Unreachable
+ </td>
+ <td> DNS Unreachable
<% end %>
</td>
<td><%= voter.vote.votestring %></td>
<% end %>
</td>
<td><%= voter.vote.votestring %></td>
Benjamin Mako Hill
||
Want to submit a patch?