diff --git a/src/treepuncher/__main__.py b/src/treepuncher/__main__.py index 1208dfc..adacddd 100644 --- a/src/treepuncher/__main__.py +++ b/src/treepuncher/__main__.py @@ -15,7 +15,8 @@ from dataclasses import dataclass, MISSING, fields from setproctitle import setproctitle -from .treepuncher import Treepuncher, MissingParameterError, Addon, ConfigObject, Provider +from .treepuncher import Treepuncher, MissingParameterError, Addon, Provider +from .scaffold import ConfigObject from .helpers import configure_logging def main(): diff --git a/src/treepuncher/treepuncher.py b/src/treepuncher/treepuncher.py index 394064d..a479c03 100644 --- a/src/treepuncher/treepuncher.py +++ b/src/treepuncher/treepuncher.py @@ -59,7 +59,7 @@ class Treepuncher( v = kwargs.get(k) or self.cfg.get(k) or default if not v and required: raise MissingParameterError(f"Missing configuration parameter '{k}'") - if t is bool and v.lower().strip() == 'false': # hardcoded special case + if t is bool and isinstance(v, str) and v.lower().strip() == 'false': # hardcoded special case return False return t(v)