Implement omit for module args, also add tests for it

This commit is contained in:
Victor Lin 2014-08-01 22:11:42 -07:00 committed by James Cammarata
commit 559c04f324
4 changed files with 46 additions and 21 deletions

View file

@ -787,6 +787,10 @@ def _validate_both_dicts(a, b):
"failed to combine variables, expected dicts but got a '%s' and a '%s'" % (type(a).__name__, type(b).__name__)
)
def serialize_args(args):
''' convert a dict to a string of key/value items '''
return ' '.join("%s='%s'" % item for item in args.iteritems())
def merge_hash(a, b):
''' recursively merges hash b into a
keys from b take precedence over keys from a '''