diff sat/core/constants.py @ 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 9241f9d1f9e5
children 767e1ef6e1bd
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):