From: Frederic Massart Date: Mon, 9 Sep 2013 07:08:22 +0000 (+0800) Subject: Fix loss of variable type in config set X-Git-Tag: v0.5~23 X-Git-Url: https://git.cameron1729.xyz/?a=commitdiff_plain;h=5641af3eb6d80b52ae625c8d860d1dd0202349e7;p=mdk.git Fix loss of variable type in config set --- diff --git a/lib/config.py b/lib/config.py index 1405d42..1836096 100644 --- a/lib/config.py +++ b/lib/config.py @@ -125,7 +125,8 @@ class ConfigObject(object): def set(self, name, value): """Set a new setting""" - value = unicode(value) + if type(value) == str: + value = unicode(value) name = unicode(name).split('.') count = len(name) data = self.data