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 | b215a3f23613138e574064d7f8647c1776db4a10 (patch) | |
tree | 0eca94fb29efc0ab757b7014ddc3d7e10fff3bfe /lib/custodian/protocoltest | |
parent | 6b15b775b6faaa8a5ba2d6ccbff21d8b85e3afd8 (diff) |
Ensure DNS test returns nil if an unrecognised record type is given,
to make sure error handling in the caller works.
Diffstat (limited to 'lib/custodian/protocoltest')
-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 |