From 3705d5448545419a09c16ef87b4550a7a55d4cf9 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 1 Oct 2015 19:03:04 -0400 Subject: [PATCH] fixed error reporting on splitter --- lib/ansible/parsing/splitter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/parsing/splitter.py b/lib/ansible/parsing/splitter.py index 989c52e203..ef8fc89b00 100644 --- a/lib/ansible/parsing/splitter.py +++ b/lib/ansible/parsing/splitter.py @@ -22,6 +22,8 @@ __metaclass__ = type import re import codecs +from ansible.errors import AnsibleError + # Decode escapes adapted from rspeer's answer here: # http://stackoverflow.com/questions/4020539/process-escape-sequences-in-a-string-in-python _HEXCHAR = '[a-fA-F0-9]' @@ -57,7 +59,7 @@ def parse_kv(args, check_raw=False): vargs = split_args(args) except ValueError as ve: 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: raise