From 46097bf25ca174c974742f4e9e0196bb819c5da1 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Mon, 10 Dec 2012 09:20:24 +0000 Subject: Ensure DNS test returns nil if an unrecognised record type is given, to make sure error handling in the caller works. --- lib/custodian/protocoltest/dns.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/custodian/protocoltest/dns.rb b/lib/custodian/protocoltest/dns.rb index d491633..65dfa2b 100644 --- a/lib/custodian/protocoltest/dns.rb +++ b/lib/custodian/protocoltest/dns.rb @@ -141,7 +141,7 @@ module Custodian dns.getresources(name, Resolv::DNS::Resource::IN::MX).map{ |r| results.push Resolv.getaddresses(r.exchange.to_s()) } else @error = "Unknown record type to resolve: '#{ltype}'" - return false + return nil end end rescue Exception => x -- cgit v1.2.1