small fixes
This commit is contained in:
parent
5f2beac41b
commit
79886a2c64
2 changed files with 3 additions and 2 deletions
|
@ -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():
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue