summaryrefslogtreecommitdiff
path: root/lib/custodian/alerts
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-04-16 09:51:05 +0100
committerSteve Kemp <steve@steve.org.uk>2015-04-16 09:51:05 +0100
commitd7472b5eceb59bb26ba36aaaa7492b77098b9220 (patch)
tree3ad4ace0eadea014605397fb98b6a2bc85019028 /lib/custodian/alerts
parent2446686e12d1c17b89f792c53bba7d7ff853f719 (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')
-rw-r--r--lib/custodian/alerts/mauve.rb9
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