X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fpuppetmaster%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fwhohosts.rb;fp=modules%2Fpuppetmaster%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fwhohosts.rb;h=d0321846e29967b2b2a9f175e881e33148f943e4;hb=635c438960354f5a6a4ed2574ab5e6a82eabe630;hp=73f4212b6f2513cc1c58c2b1fde95cb1f5967fc2;hpb=bf59f9fdc671bd9dc855f0ab9e25dde9613a07f8;p=mirror%2Fdsa-puppet.git diff --git a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb index 73f4212b6..d0321846e 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb @@ -23,12 +23,13 @@ module Puppet::Parser::Functions next end netrange.each do |net| - begin - if IPAddr.new(net).include?(addr) - return hoster + begin + if IPAddr.new(net).include?(addr) + return hoster + end + rescue + raise "Could not match addr #{addr} for net #{net}" end - rescue - raise "Could not match addr #{addr} for net #{net}" end end end