Mercurial > libervia-backend
changeset 2524:e96076cdf74c
core (constants): accept "yes" as a True value in bool()
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 16 Mar 2018 17:00:09 +0100 (2018-03-16) |
parents | 21d43eab3fb9 |
children | e8e1507049b7 |
files | src/core/constants.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/constants.py Fri Mar 16 16:59:16 2018 +0100 +++ b/src/core/constants.py Fri Mar 16 17:00:09 2018 +0100 @@ -376,7 +376,7 @@ def bool(cls, value): """@return (bool): bool value for associated constant""" assert isinstance(value, basestring) - return value.lower() in (cls.BOOL_TRUE, "1") + return value.lower() in (cls.BOOL_TRUE, "1", "yes") @classmethod def boolConst(cls, value):