Allow multiline strings to work okay in only_if

Fixes issue #1137
This commit is contained in:
Daniel Hokka Zakrisson 2012-09-29 21:09:38 +02:00
parent 9377c3f525
commit be9d7df6c4

View file

@ -141,7 +141,7 @@ def check_conditional(conditional):
return not var.startswith("$")
def is_unset(var):
return var.startswith("$")
return eval(conditional)
return eval(conditional.replace("\n", "\\n"))
def is_executable(path):
'''is the given path executable?'''