Also catch NameErrors which would indicate missing quotes

pull/4420/head
Daniel Hokka Zakrisson 2013-02-07 11:56:29 +01:00
parent bc709e7b67
commit 70d5dad726
1 changed files with 1 additions and 1 deletions

View File

@ -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):