Document 'when' and tweak the code to be a little more comprehensive on what is false.

This commit is contained in:
Michael DeHaan 2012-11-26 18:37:44 -05:00
parent 08b3c77dc7
commit da90c5f75e
2 changed files with 42 additions and 1 deletions

View file

@ -232,7 +232,7 @@ class Task(object):
tcopy = tokens[1:]
for (i, t) in enumerate(tcopy):
if t.find("$") != -1:
tcopy[i] = "(is_set('''%s''') and '''%s'''.lower() not in ('false', 'none', '0', ''))" % (t, t)
tcopy[i] = "(is_set('''%s''') and '''%s'''.lower() not in ('false', 'no', 'n', 'none', '0', ''))" % (t, t)
return " ".join(tcopy)
else: