From: Peter Palfrader Date: Tue, 1 Mar 2011 09:56:31 +0000 (+0100) Subject: Hmm. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=635c438960354f5a6a4ed2574ab5e6a82eabe630;p=dsa-puppet.git Hmm. --- diff --git a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb index 73f4212b..d0321846 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