From bf59f9fdc671bd9dc855f0ab9e25dde9613a07f8 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 1 Mar 2011 10:54:08 +0100 Subject: [PATCH] I wonder if that will help --- .../puppetmaster/lib/puppet/parser/functions/whohosts.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb index 972c3bc93..73f4212b6 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb @@ -23,8 +23,12 @@ module Puppet::Parser::Functions next end netrange.each do |net| - 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 end end -- 2.20.1