puppetlabs/puppet — pull request #1380 by reidmv (2013-01-08 19:20:37+00:00)
Title: Fix empty hash console rendering bug

Previously, if a face action returned an empty hash Puppet would print out an error something like the following:

err: undefined method `+' for nil:NilClass
err: Try 'puppet help stack build' for usage

The cause of the error was a method in network/formats.rb that did not account for the possibilty of an empty hash. This commit resolves the issue by adding logic to account for the empty hash scenario, rendering an empty hash as an empty string.

I am in no way attached to this particular choice of how to fix the problem. If there's a cleaner way to do it in code please someone do it, merge it, and close this pull request. I just want the bug fixed. :-)

I have no idea where this *should* go, hence pull request against master.