From 316a5bded584dd6b8803c46b867e896f596bcd62 Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Sat, 18 Jun 2022 22:49:24 +0100 Subject: [PATCH] update bool parser --- examples/dsl/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/dsl/__main__.py b/examples/dsl/__main__.py index 080fe10..b7bc526 100644 --- a/examples/dsl/__main__.py +++ b/examples/dsl/__main__.py @@ -44,8 +44,8 @@ class Parser: kls = "".join(kls) index = int(*index) target = getattr(self.vm, kls)[index] - if val in ["on", "off"]: - setattr(target, param, 1 if val == "on" else 0) + if val in ["off", "on"]: + setattr(target, param, bool(["off", "on"].index(val))) if param in ["gain", "comp", "gate", "limit", "audibility"]: setattr(target, param, float(val)) if param in ["label"]: