summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/event.rb2
-rw-r--r--lib/puppet/transportable.rb12
-rw-r--r--lib/puppet/type/service.rb4
-rw-r--r--test/other/tc_transactions.rb2
4 files changed, 11 insertions, 9 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!
diff --git a/test/other/tc_transactions.rb b/test/other/tc_transactions.rb
index ec1b9f277..ac2cd8578 100644
--- a/test/other/tc_transactions.rb
+++ b/test/other/tc_transactions.rb
@@ -25,7 +25,7 @@ class TestTransactions < Test::Unit::TestCase
Puppet::Type.allclear
}
- print "\n\n"
+ print "\n\n" if Puppet[:debug]
end
def newfile