diff options
Diffstat (limited to 'lib/bb/utils.py')
-rw-r--r-- | lib/bb/utils.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py index bca4830f2..cdb3c6864 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -990,6 +990,9 @@ def to_boolean(string, default=None): if not string: return default + if isinstance(string, int): + return string != 0 + normalized = string.lower() if normalized in ("y", "yes", "1", "true"): return True |