diff options
| author | Markus Roberts <Markus@reality.com> | 2011-03-31 16:41:11 -0700 |
|---|---|---|
| committer | Markus Roberts <Markus@reality.com> | 2011-03-31 16:43:37 -0700 |
| commit | fa5c2b1b1494cc760f95c95e6e50a304c2651c7b (patch) | |
| tree | c54a4c7a41ed80e6ff9a1d53ff5b2a6d8bf4f48a /lib | |
| parent | 7b83cd9ff9f2e2b61ce4c99057ec0697140a5a5e (diff) | |
| download | puppet-fa5c2b1b1494cc760f95c95e6e50a304c2651c7b.tar.gz puppet-fa5c2b1b1494cc760f95c95e6e50a304c2651c7b.tar.xz puppet-fa5c2b1b1494cc760f95c95e6e50a304c2651c7b.zip | |
(6911) Cleanup of generate_additional_resources
The previous commit left only one meaningful value for the method parameter
of generate_additional_resources, making it a constant not a parameter. This
commit removes it.
Paired-with: Jesse Wolfe
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/transaction.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/puppet/transaction.rb b/lib/puppet/transaction.rb index aa0eec3ee..ad79f176e 100644 --- a/lib/puppet/transaction.rb +++ b/lib/puppet/transaction.rb @@ -173,13 +173,13 @@ class Puppet::Transaction # A general method for recursively generating new resources from a # resource. - def generate_additional_resources(resource, method, presume_prefix_dependencies=false) - return [] unless resource.respond_to?(method) + def generate_additional_resources(resource) + return [] unless resource.respond_to?(:generate) begin - made = resource.send(method) + made = resource.generate rescue => detail puts detail.backtrace if Puppet[:trace] - resource.err "Failed to generate additional resources using '#{method}': #{detail}" + resource.err "Failed to generate additional resources using 'generate': #{detail}" end return [] unless made made = [made] unless made.is_a?(Array) @@ -189,7 +189,7 @@ class Puppet::Transaction @catalog.add_resource(res) res.finish make_parent_child_relationship(resource, res) - generate_additional_resources(res, method, presume_prefix_dependencies) + generate_additional_resources(res) true rescue Puppet::Resource::Catalog::DuplicateResourceError res.info "Duplicate generated resource; skipping" @@ -205,7 +205,7 @@ class Puppet::Transaction newlist = [] while ! list.empty? list.each do |resource| - newlist += generate_additional_resources(resource, :generate) + newlist += generate_additional_resources(resource) end list = newlist newlist = [] |
