fix type check
This commit is contained in:
parent
cf2cf51b17
commit
fd8b9bef3b
|
@ -30,7 +30,7 @@ def is_debug() -> bool:
|
||||||
def get_boolean(args: Any, key: str, default_value: bool) -> bool:
|
def get_boolean(args: Any, key: str, default_value: bool) -> bool:
|
||||||
val = args.get(key, str(default_value))
|
val = args.get(key, str(default_value))
|
||||||
|
|
||||||
if type(val) == bool:
|
if isinstance(val, bool):
|
||||||
return val
|
return val
|
||||||
|
|
||||||
return val.lower() in ("1", "t", "true", "y", "yes")
|
return val.lower() in ("1", "t", "true", "y", "yes")
|
||||||
|
|
Loading…
Reference in New Issue