From d02eb97eeb9727f37664051e99f9885c192ca6fb Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 19 Feb 2015 13:49:12 +0200 Subject: [PATCH] Fix setting boolean value --- platformio/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platformio/app.py b/platformio/app.py index 4c8c6b6e..60d7d827 100644 --- a/platformio/app.py +++ b/platformio/app.py @@ -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: