diff options
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/event.rb | 2 | ||||
-rw-r--r-- | lib/puppet/transportable.rb | 12 | ||||
-rw-r--r-- | lib/puppet/type/service.rb | 4 |
3 files changed, 10 insertions, 8 deletions
diff --git a/lib/puppet/event.rb b/lib/puppet/event.rb index 3ca76a83b..61efc52de 100644 --- a/lib/puppet/event.rb +++ b/lib/puppet/event.rb @@ -130,7 +130,7 @@ class Puppet::NotUsed # access to the actual hash, which is silly def action if not defined? @actions - puts "defining action hash" + Puppet.debug "defining action hash" @actions = Hash.new end @actions diff --git a/lib/puppet/transportable.rb b/lib/puppet/transportable.rb index c803a9e3d..9d1373024 100644 --- a/lib/puppet/transportable.rb +++ b/lib/puppet/transportable.rb @@ -51,16 +51,14 @@ module Puppet def to_type retobj = nil if type = Puppet::Type.type(self.type) - #begin + begin # this will fail if the type already exists # which may or may not be a good thing... retobj = type.new(self) - #rescue => detail - # Puppet.err "Failed to create %s: %s" % [type.name,detail] - # puts self.class - # puts self.inspect - # exit - #end + rescue => detail + Puppet.err "Failed to create %s: %s" % [type.name,detail] + return nil + end else raise "Could not find object type %s" % self.type end diff --git a/lib/puppet/type/service.rb b/lib/puppet/type/service.rb index 99c43b1d5..d59d227fc 100644 --- a/lib/puppet/type/service.rb +++ b/lib/puppet/type/service.rb @@ -132,6 +132,10 @@ module Puppet raise "Could not find init script for '%s'" % name end + def Service.searchpath + return @searchpaths + end + def Service.setpath(ary) # verify each of the paths exists #ary.flatten! |