diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-12-10 09:20:24 +0000 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-12-10 09:20:24 +0000 |
commit | 46097bf25ca174c974742f4e9e0196bb819c5da1 (patch) | |
tree | 46637380a9ea8362063fa0ee4d3353ed4dff11f5 | |
parent | ab69c4c0ae54ca3624c7bac2066a2aff36b458bc (diff) |
Ensure DNS test returns nil if an unrecognised record type is given,
to make sure error handling in the caller works.
-rw-r--r-- | lib/custodian/protocoltest/dns.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |