Also catch NameErrors which would indicate missing quotes

pull/1993/merge
Daniel Hokka Zakrisson 12 years ago
parent bc709e7b67
commit 70d5dad726

@ -156,7 +156,7 @@ def check_conditional(conditional):
try:
return eval(conditional.replace("\n", "\\n"))
except SyntaxError as e:
except (NameError, SyntaxError):
raise errors.AnsibleError("Could not evaluate the expression: " + conditional)
def is_executable(path):

Loading…
Cancel
Save