cloudnull/ansible-lxc-rpc — pull request #1 by matthewoliver (2014-10-16 03:25:28+00:00)
Title: Removed the need for the collections module

The reason I was using collections.mapping was in case we wanted to
support other types of maps other then a dictionary. Seeing as the
name of the method is now merge_dicts and the doc string specifies
that dicts are expected, I removed the need for the collections
module.

-if isinstance(value, collections.Mapping):
+if isinstance(value, dict):

Also added an 'or {}' to call to _merge_dict from _extra_config.
This way if yaml.safe_load returns a None, or other false value an
empty dict will be passed to the _merge_dict method as expected.

-yaml.safe_load(f.read())
+yaml.safe_load(f.read()) or {}

I.e if someone just dumps/touches an empty file into the conf.d it
wont crash.