changeset 304:d8361dd70d2d

FIX: Map unicode strings to boolean values because this is the canonical texttype in confixmmix
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 25 Apr 2021 18:05:26 +0200
parents 2a2f5b86fe34
children f529ca46dd50
files configmix/config.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configmix/config.py	Sun Apr 25 16:09:00 2021 +0200
+++ b/configmix/config.py	Sun Apr 25 18:05:26 2021 +0200
@@ -122,8 +122,10 @@
             return s
 
     # Conversion of booleans
-    _BOOL_CVT = {'1': True, 'yes': True, 'true': True, 'on': True,
-                 '0': False, 'no': False, 'false': False, 'off': False}
+    _BOOL_CVT = {
+        u('1'): True, u('yes'): True, u('true'): True, u('on'): True,
+        u('0'): False, u('no'): False, u('false'): False, u('off'): False
+    }
 
     def getfloatvar_s(self, varname, default=_MARKER):
         """Get a (possibly substituted) variable and convert text to a