changeset 2955:bb36cf6289c6

core (constants): "on" can now be used as True value in bool method.
author Goffi <goffi@goffi.org>
date Sun, 26 May 2019 22:22:00 +0200
parents 5e72efd2f95d
children 767e1ef6e1bd
files sat/core/constants.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat/core/constants.py	Sun May 26 22:21:56 2019 +0200
+++ b/sat/core/constants.py	Sun May 26 22:22:00 2019 +0200
@@ -438,7 +438,7 @@
     def bool(cls, value):
         """@return (bool): bool value for associated constant"""
         assert isinstance(value, basestring)
-        return value.lower() in (cls.BOOL_TRUE, "1", "yes")
+        return value.lower() in (cls.BOOL_TRUE, "1", "yes", "on")
 
     @classmethod
     def boolConst(cls, value):