diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-04-16 09:51:05 +0100 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-04-16 09:51:05 +0100 |
commit | d7472b5eceb59bb26ba36aaaa7492b77098b9220 (patch) | |
tree | 3ad4ace0eadea014605397fb98b6a2bc85019028 /lib/custodian/alerts/mauve.rb | |
parent | 2446686e12d1c17b89f792c53bba7d7ff853f719 (diff) |
Correctly use the result of the resolution in the alert.
There was a bug in that we used the same local-variable "result"
for two purposes, trashing the intended use-case.
Diffstat (limited to 'lib/custodian/alerts/mauve.rb')
-rw-r--r-- | lib/custodian/alerts/mauve.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/custodian/alerts/mauve.rb b/lib/custodian/alerts/mauve.rb index 2b48fbc..d2b3a12 100644 --- a/lib/custodian/alerts/mauve.rb +++ b/lib/custodian/alerts/mauve.rb @@ -338,12 +338,11 @@ module Custodian # # Return the formatted message # - ips.each do |result| - - if Custodian::Util::Bytemark.inside?(result.to_s) - result += "<p>#{host} resolves to #{result} which is inside the Bytemark network.</p>" + ips.each do |ipaddr| + if Custodian::Util::Bytemark.inside?(ipaddr.to_s) + result += "<p>#{host} resolves to #{ipaddr} which is inside the Bytemark network.</p>" else - result += "<p>#{host} resolves to #{result} which is OUTSIDE the Bytemark network.</p>" + result += "<p>#{host} resolves to #{ipaddr} which is OUTSIDE the Bytemark network.</p>" end end |