diff options
Diffstat (limited to 'lib/puppet/parser')
| -rw-r--r-- | lib/puppet/parser/type_loader.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/parser/type_loader.rb b/lib/puppet/parser/type_loader.rb index e56ab9418..6c32f6a92 100644 --- a/lib/puppet/parser/type_loader.rb +++ b/lib/puppet/parser/type_loader.rb @@ -126,16 +126,16 @@ class Puppet::Parser::TypeLoader # Utility method factored out of load for handling thread-safety. # This isn't tested in the specs, because that's basically impossible. - def import_if_possible(file) + def import_if_possible(file, &blk) return if @loaded.include?(file) begin case @loading.owner_of(file) when :this_thread return when :another_thread - return import_if_possible(file) + return import_if_possible(file, &blk) when :nobody - yield + blk.call end rescue Puppet::ImportError => detail # We couldn't load the item |
