Issue #2471 has been updated by Nigel Kersten. Assigned to deleted (Nigel Kersten) Target version changed from 0.25.0 to 0.26.0 Complexity changed from Easy to Unknown
This doesn't work as we haven't set up any log destinations. I started to set this up, but then ran into issues where the deprecation warning was being displayed on code as simple as: <pre> require 'puppet' puts Puppet.version </pre> so for my particular case have given up and am marking as deprecated in the genconfig output/documentation. Unassigning, bumping to 0.26.0 ---------------------------------------- Bug #2471: Puppet.warning doesn't work with a hook in defaults.rb http://projects.reductivelabs.com/issues/2471 Author: Nigel Kersten Status: Ready for Testing Priority: Low Assigned to: Category: plumbing Target version: 0.26.0 Complexity: Unknown Affected version: 0.25.0 Keywords: If you try to add a Puppet.warning to a hook in defaults.rb, like: <pre> :reportserver => { :default => "$server", :desc => "(Deprecated) The server to which to send transaction reports.", :call_on_define => true, :hook => proc { |value| if value $stderr.puts "This works" Puppet.warning "This will not." Puppet.settings[:report_server] = value end } }, </pre> you get: <pre> /Library/Ruby/Site/1.8/puppet/util/log.rb:517:in `source=': uninitialized constant Puppet::Type (NameError) </pre> I notice :cacrl is using a Puppet.warning in a hook and is subject to the same issue. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://reductivelabs.com/redmine/my/account --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en -~----------~----~----~----~------~----~------~--~---
