mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-07-10 00:53:30 +01:00
Updated boolean to interpret 'off' as False
This commit is contained in:
@ -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):
|
||||||
|
Reference in New Issue
Block a user