From 64bbeb9d24ccdcb9a468b186ed5e70f5bc925bd4 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sat, 19 Oct 2013 13:57:28 -0400 Subject: [PATCH] Suggest fixing unbalanced quotes in a bit less cases. Fixes #4501 --- lib/ansible/utils/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/ansible/utils/__init__.py b/lib/ansible/utils/__init__.py index 864d66855f5..41033bd19de 100644 --- a/lib/ansible/utils/__init__.py +++ b/lib/ansible/utils/__init__.py @@ -390,7 +390,6 @@ Or: return msg else: parts = probline.split(":") - print parts if len(parts) > 1: middle = parts[1].strip() match = False @@ -399,9 +398,8 @@ Or: match = True elif middle.startswith('"') and not middle.endswith('"'): match = True - if middle[0] in [ '"', "'" ] and middle[-1] in [ '"', "'" ]: + if middle[0] in [ '"', "'" ] and middle[-1] in [ '"', "'" ] and probline.count("'") > 2 or probline.count("'") > 2: unbalanced = True - if match: msg = msg + """ This one looks easy to fix. It seems that there is a value started