mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -03:30
Merge pull request #8370 from ryanpetrello/fix-bad-extra-vars-warning
fix a confusing error message when extra vars aren't valid JSON/YAML Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
bad064b577
@ -178,6 +178,9 @@ class ResourceOptionsParser(object):
|
||||
except Exception:
|
||||
raise argparse.ArgumentTypeError("{} is not valid JSON or YAML".format(v))
|
||||
|
||||
if not isinstance(parsed, dict):
|
||||
raise argparse.ArgumentTypeError("{} is not valid JSON or YAML".format(v))
|
||||
|
||||
for k, v in parsed.items():
|
||||
# add support for file reading at top-level JSON keys
|
||||
# (to make things like SSH key data easier to work with)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user