1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +00:00

Updated boolean to interpret 'off' as False

This commit is contained in:
Sergei Trofimov 2015-09-09 14:32:27 +01:00
parent f430187b11
commit b6c497d32b

View File

@ -47,7 +47,7 @@ def boolean(value):
e.g. boolean('0') and boolean('false') will both yield False.
"""
false_strings = ['', '0', 'n', 'no']
false_strings = ['', '0', 'n', 'no', 'off']
if isinstance(value, basestring):
value = value.lower()
if value in false_strings or 'false'.startswith(value):