mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 13:50:22 -07:00
fixed error reporting on splitter
This commit is contained in:
parent
de2f62bd9e
commit
3705d54485
1 changed files with 3 additions and 1 deletions
|
@ -22,6 +22,8 @@ __metaclass__ = type
|
||||||
import re
|
import re
|
||||||
import codecs
|
import codecs
|
||||||
|
|
||||||
|
from ansible.errors import AnsibleError
|
||||||
|
|
||||||
# Decode escapes adapted from rspeer's answer here:
|
# Decode escapes adapted from rspeer's answer here:
|
||||||
# http://stackoverflow.com/questions/4020539/process-escape-sequences-in-a-string-in-python
|
# http://stackoverflow.com/questions/4020539/process-escape-sequences-in-a-string-in-python
|
||||||
_HEXCHAR = '[a-fA-F0-9]'
|
_HEXCHAR = '[a-fA-F0-9]'
|
||||||
|
@ -57,7 +59,7 @@ def parse_kv(args, check_raw=False):
|
||||||
vargs = split_args(args)
|
vargs = split_args(args)
|
||||||
except ValueError as ve:
|
except ValueError as ve:
|
||||||
if 'no closing quotation' in str(ve).lower():
|
if 'no closing quotation' in str(ve).lower():
|
||||||
raise errors.AnsibleError("error parsing argument string, try quoting the entire line.")
|
raise AnsibleError("error parsing argument string, try quoting the entire line.")
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue