def __init__(self, key, type=None): self.__gconf = GConfServer().client self.__value = None if key.startswith(GCONF_ROOT_DIR): self.__key = key self.__name = self._without_root_path(key) else: self.__key = self._with_root_path(key) self.__name = key if type: self.__type = type else: try: self.__type = self.__gconf.get(self.__key).type except AttributeError: raise GConfKey.KeyDoesntExits( _("Can't find the key '%s'") % self.__key)