diff --git a/slothy/cli/__init__.py b/slothy/cli/__init__.py index 6f7d29bfa..13fe39902 100644 --- a/slothy/cli/__init__.py +++ b/slothy/cli/__init__.py @@ -222,6 +222,9 @@ def parse_as_float(val): def check_ty(ty_real): if ty is None or ty is type(None) or ty == ty_real: return + # Allow lists to be converted to sets + if ty == set and ty_real == list: + return raise CmdLineException( f"Configuration value {val} isn't correctly typed -- " f"expected {ty}, but got {ty_real}" @@ -242,11 +245,6 @@ def check_ty(ty_real): check_ty(bool) logger.debug("Value %s parsed as Boolean", val) return False - # Try to parse as RegisterType - ty = arch.RegisterType.from_string(val) - if ty is not None: - logger.debug("Value %s parsed as RegisterType", val) - return ty f = parse_as_float(val) if f is not None: check_ty(float)