Hmm.
[mirror/dsa-puppet.git] / modules / puppetmaster / lib / puppet / parser / functions / whohosts.rb
index 73f4212..d032184 100644 (file)
@@ -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