give better error message
authorStephen Gran <steve@lobefin.net>
Sun, 31 May 2015 15:30:13 +0000 (16:30 +0100)
committerStephen Gran <steve@lobefin.net>
Sun, 31 May 2015 15:30:13 +0000 (16:30 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/puppetmaster/lib/puppet/parser/functions/entropy_provider.rb

index 85b8bf1..e16290c 100644 (file)
@@ -30,6 +30,7 @@ module Puppet::Parser::Functions
         hoster[name] = [] unless hoster[name]
         hoster[name] << node
       end
+      raise Puppet::ParseError, "entropy_provider: no entropy providers" unless provider.size > 0
 
       # figure out which entropy provider to use
       consumer_hoster = nodeinfo['hoster']