HomePhorge

(#12960) Fix puppet resource <type> if type has no providers
0b7841a052ddUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#12960) Fix puppet resource <type> if type has no providers

puppet resource type calls the instances method of the type class. The
instances method then calls providers_by_source which can fail if the
following conditions are true

  1. there is at least one provider defined for the type
  2. all providers are unsuitable

If both requirements are met, the method self.defaultprovider will
return nil and we get the following error message (provided by Ben Ford)

  1. puppet resource maillist puppet/type.rb:902:in providers_by_source': undefined method source' for nil:NilClass (NoMethodError)

The fix handles the case where defaultprovider can be nil

Details

Provenance
Stefan Schulte <stefan.schulte@taunusstein.net>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU3c422310c05e: Merge branch '2.7rc' into 2.7.x
Branches
Unknown
Tags
Unknown

Event Timeline

Stefan Schulte <stefan.schulte@taunusstein.net> committed rPU0b7841a052dd: (#12960) Fix puppet resource <type> if type has no providers (authored by Stefan Schulte <stefan.schulte@taunusstein.net>).Mar 6 2012, 8:33 PM