mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 20:38:57 +00:00
Updated boolean to interpret 'off' as False
This commit is contained in:
parent
f430187b11
commit
b6c497d32b
@ -47,7 +47,7 @@ def boolean(value):
|
|||||||
e.g. boolean('0') and boolean('false') will both yield False.
|
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):
|
if isinstance(value, basestring):
|
||||||
value = value.lower()
|
value = value.lower()
|
||||||
if value in false_strings or 'false'.startswith(value):
|
if value in false_strings or 'false'.startswith(value):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user