puppetlabs/puppet — pull request #1684 by adrienthebo (2013-05-31 19:02:40+00:00)
Title: 20997 pmt handle forge warnings

When servicing requests, the Puppet Forge can add warnings to a response under the `_warnings` key. No part of the PMT explicitly handles this, and module subcommands can choke on this field since they are not expecting it. In the case of `puppet module install` this also triggers another bug when receiving mangled module data, and the `_warnings` key acts like a malformed module metadata entry.

This pull request adds support for `_warnings` by handling the JSON response in the Forge class. If a response is returned with that key, all messages are printed out at the `warning` level. The `_warning` key is subsequently stripped from the request so consumers of the JSON request don't have to be aware of this field.