+1 of course.
On Sat, Jul 10, 2010 at 10:22 PM, Jesse Wolfe <[email protected]> wrote: > import_if_possible calls itself recursively, but it was failing to pass > its block parameter to its younger self. Thus when the inner call > reached the un-blocked case, it raised an exception rather than doing > something useful. > > Signed-off-by: Jesse Wolfe <[email protected]> > --- > 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 e56ab94..6c32f6a 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 > -- > 1.7.0.4 > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/puppet-dev?hl=en. > > -- ----------------------------------------------------------- The power of accurate observation is commonly called cynicism by those who have not got it. ~George Bernard Shaw ------------------------------------------------------------ -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
