summaryrefslogtreecommitdiffstats
path: root/gconf
diff options
context:
space:
mode:
authorHuang Peng <shawn.p.huang@gmail.com>2008-07-29 19:23:27 +0800
committerHuang Peng <shawn.p.huang@gmail.com>2008-07-29 19:23:27 +0800
commit616216fefd6e208141e95564698e3716b275ca05 (patch)
tree2e82ddfbec09a133b2354e30d0e31c29a7a08054 /gconf
parent03758f5cab74f7e1bba3383c48eb30616aa555da (diff)
downloadibus-616216fefd6e208141e95564698e3716b275ca05.tar.gz
ibus-616216fefd6e208141e95564698e3716b275ca05.tar.xz
ibus-616216fefd6e208141e95564698e3716b275ca05.zip
Raise Exception when receive unsupport type.
Diffstat (limited to 'gconf')
-rw-r--r--gconf/config.py3
1 files changed, 3 insertions, 0 deletions
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):