diff src/memory/memory.py @ 866:f27d736428f1

core (memory): added 'no' value management in configuration's booleans
author Goffi <goffi@goffi.org>
date Tue, 25 Feb 2014 23:03:13 +0100
parents c2f6ada7858f
children 308a96bc7c1b
line wrap: on
line diff
--- a/src/memory/memory.py	Tue Feb 25 23:01:26 2014 +0100
+++ b/src/memory/memory.py	Tue Feb 25 23:03:13 2014 +0100
@@ -409,7 +409,7 @@
         if attr == 'value':
             value_to_use = value if value is not None else node.getAttribute(attr)  # we use value (user defined) if it exist, else we use node's default value
             if node.getAttribute('type') == 'bool':
-                return value_to_use.lower() not in ('false', '0')
+                return value_to_use.lower() not in ('false', '0', 'no')
             return value_to_use
         return node.getAttribute(attr)