From 4e2adddf79bbfcfc42720c0a52c6a6a741fb1ebe Mon Sep 17 00:00:00 2001 From: Huang Peng Date: Wed, 30 Jul 2008 15:57:03 +0800 Subject: [PATCH] Test bool at first. --- gconf/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gconf/config.py b/gconf/config.py index 1a43b658..1cdb155f 100644 --- a/gconf/config.py +++ b/gconf/config.py @@ -86,15 +86,15 @@ class Config(ibus.Object): if isinstance(value, str) or isinstance(value, unicode): ret = gconf.Value(gconf.VALUE_STRING) ret.set_string(value) + elif isinstance(value, bool): + ret = gconf.Value(gconf.VALUE_BOOL) + ret.set_bool(value) elif isinstance(value, int): ret = gconf.Value(gconf.VALUE_INT) ret.set_int(value) elif isinstance(value, float): ret = gconf.Value(gconf.VALUE_FLOAT) ret.set_float(value) - elif isinstance(value, bool): - ret = gconf.Value(gconf.VALUE_BOOL) - ret.set_bool(value) elif isinstance(value, tuple): if len(value) != 2: raise ibus.IBusException("Pair must have two value")