Skip to content

Commit

Permalink
Fix module arg parsing when 'args' are present but not a dict (v2)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimi-c committed May 3, 2015
1 parent 6a44056 commit 8cf4452
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion v2/ansible/parsing/mod_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ def _normalize_parameters(self, thing, action=None, additional_args=dict()):

# this can occasionally happen, simplify
if args and 'args' in args:
args = args['args']
tmp_args = args['args']
del args['args']
if isinstance(tmp_args, string_types):
tmp_args = parse_kv(tmp_args)
args.update(tmp_args)

# finally, update the args we're going to return with the ones
# which were normalized above
Expand Down
1 change: 1 addition & 0 deletions v2/ansible/plugins/cache/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class FactCache(MutableMapping):
def __init__(self, *args, **kwargs):
self._plugin = cache_loader.get(C.CACHE_PLUGIN)
if self._plugin is None:
# FIXME: this should be an exception
return

def __getitem__(self, key):
Expand Down

0 comments on commit 8cf4452

Please sign in to comment.