summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util/feature.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/util/feature.rb')
-rw-r--r--lib/puppet/util/feature.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/puppet/util/feature.rb b/lib/puppet/util/feature.rb
index 102bca778..add1b2691 100644
--- a/lib/puppet/util/feature.rb
+++ b/lib/puppet/util/feature.rb
@@ -67,7 +67,7 @@ class Puppet::Util::Feature
ary = [ary] unless ary.is_a?(Array)
ary.each do |lib|
- load_library(lib)
+ return false unless load_library(lib, name)
end
# We loaded all of the required libraries
@@ -76,7 +76,7 @@ class Puppet::Util::Feature
private
- def load_library(lib)
+ def load_library(lib, name)
unless lib.is_a?(String)
raise ArgumentError, "Libraries must be passed as strings not %s" % lib.class
end
@@ -85,7 +85,8 @@ class Puppet::Util::Feature
require lib
rescue Exception
Puppet.debug "Failed to load library '%s' for feature '%s'" % [lib, name]
- result = false
+ return false
end
+ return true
end
end