change error message on check_conditional when variable does not exist

pull/1772/head
fdavis 12 years ago
parent 23f2a7fc7e
commit 7347e54b70

@ -143,7 +143,10 @@ def check_conditional(conditional):
def is_unset(var):
return var.startswith("$")
try:
return eval(conditional.replace("\n", "\\n"))
except SyntaxError as e:
raise errors.AnsibleError("Could not evaluate the expression: " + conditional)
def is_executable(path):
'''is the given path executable?'''

Loading…
Cancel
Save