core (constants): accept "yes" as a True value in bool()

This commit is contained in:
Goffi 2018-03-16 17:00:09 +01:00
commit 3b737b6fec

View file

@ -376,7 +376,7 @@ class Const(object):
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):