core: Handle empty extra vars in cli (#61831)

Fixes: #61497

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2019-09-13 01:13:41 +05:30 committed by Sam Doran
parent a6ec6c3175
commit a2e61f67d5
2 changed files with 4 additions and 0 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- Handle empty extra vars in ansible cli (https://github.com/ansible/ansible/issues/61497).

View file

@ -60,6 +60,8 @@ def parse_kv(args, check_raw=False):
if args is not None:
try:
vargs = split_args(args)
except IndexError as e:
raise AnsibleParserError("Unable to parse argument string", orig_exc=e)
except ValueError as ve:
if 'no closing quotation' in str(ve).lower():
raise AnsibleParserError("error parsing argument string, try quoting the entire line.", orig_exc=ve)