From 635c438960354f5a6a4ed2574ab5e6a82eabe630 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 1 Mar 2011 10:56:31 +0100 Subject: [PATCH] Hmm. --- .../lib/puppet/parser/functions/whohosts.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 -- 2.20.1