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