mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Fix setting boolean value
This commit is contained in:
@ -100,9 +100,9 @@ def set_setting(name, value):
|
||||
try:
|
||||
if "validator" in defdata:
|
||||
value = defdata['validator']()
|
||||
elif (isinstance(defdata['value'], bool) and
|
||||
not isinstance(value, bool)):
|
||||
value = str(value).lower() in ("yes", "y", "1")
|
||||
elif isinstance(defdata['value'], bool):
|
||||
if not isinstance(value, bool):
|
||||
value = str(value).lower() in ("yes", "y", "1")
|
||||
elif isinstance(defdata['value'], int):
|
||||
value = int(value)
|
||||
except Exception:
|
||||
|
Reference in New Issue
Block a user