Deep merge of pillar lists

This commit is contained in:
Domingo Kiser 2015-07-12 12:36:29 -07:00
parent b0196fccb7
commit d030e289b3

View file

@ -42,6 +42,9 @@ def update(dest, upd, recursive_update=True):
and isinstance(val, collections.Mapping):
ret = update(dest_subkey, val)
dest[key] = ret
elif isinstance(dest_subkey, list) \
and isinstance(val, list):
dest[key] = dest.get(key, []) + val
else:
dest[key] = upd[key]
return dest