From: Huang Peng Date: Tue, 29 Jul 2008 11:23:27 +0000 (+0800) Subject: Raise Exception when receive unsupport type. X-Git-Tag: 0.1.0.20080810~126 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=616216fefd6e208141e95564698e3716b275ca05;p=platform%2Fupstream%2Fibus.git Raise Exception when receive unsupport type. --- diff --git a/gconf/config.py b/gconf/config.py index 935fc17..e204467 100644 --- a/gconf/config.py +++ b/gconf/config.py @@ -65,6 +65,7 @@ class Config(ibus.Object): return (self.__to_py_value(value.get_car()), self.__to_py_value(value.get_cdr())) if value.type == gconf.VALUE_LIST: return map(self.__to_py_value, value.get_list()) + raise ibus.IBusException("Do not support type == %s" % str(value.type)) def __to_gconf_value(self, value): if isinstance(value, str): @@ -94,6 +95,8 @@ class Config(ibus.Object): raise ibus.IBusException("Items of a list must be in same type") ret.set_list_type(_type) ret.set_list(value) + else: + raise ibus.IBusException("Do not support type of %s." % type(value)) return ret def __value_changed_cb(self, gconf, key, value):