summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/util/autoload.rb16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/puppet/util/autoload.rb b/lib/puppet/util/autoload.rb
index ceaabe46a..7358618f9 100644
--- a/lib/puppet/util/autoload.rb
+++ b/lib/puppet/util/autoload.rb
@@ -89,14 +89,8 @@ class Puppet::Util::Autoload
rescue SystemExit,NoMemoryError
raise
rescue Exception => detail
- # I have no idea what's going on here, but different versions
- # of ruby are raising different errors on missing files.
- unless detail.to_s =~ /^no such file/i
- warn "Could not autoload %s: %s" % [name, detail]
- if Puppet[:trace]
- puts detail.backtrace
- end
- end
+ puts detail.backtrace if Puppet[:trace]
+ warn "Could not autoload #{name}: #{detail}"
return named_file_is_missing(name)
end
end
@@ -128,10 +122,8 @@ class Puppet::Util::Autoload
rescue SystemExit,NoMemoryError
raise
rescue Exception => detail
- if Puppet[:trace]
- puts detail.backtrace
- end
- warn "Could not autoload %s: %s" % [file.inspect, detail]
+ puts detail.backtrace if Puppet[:trace]
+ warn "Could not autoload #{file}: #{detail}"
end
end
end