diff --git a/test/new_api/test_choice_option.py b/test/new_api/test_choice_option.py index 02e253e..c6ef2dc 100644 --- a/test/new_api/test_choice_option.py +++ b/test/new_api/test_choice_option.py @@ -134,7 +134,7 @@ def test_choiceoption_calc_opt_function_propertyerror(): cfg = Config(odesc) api = getapi(cfg) api.property.read_write() - raises(ConfigError, "api.option('choice').value.set('no')") + raises(ValueError, "api.option('choice').value.set('no')") def test_choiceoption_calc_opt_multi_function(): diff --git a/tiramisu/api.py b/tiramisu/api.py index 531b20e..9290335 100644 --- a/tiramisu/api.py +++ b/tiramisu/api.py @@ -241,7 +241,6 @@ class TiramisuOptionOption(CommonTiramisuOption): return self._get_option().impl_is_optiondescription() - class TiramisuOptionOwner(CommonTiramisuOption): """manager option's owner""" allow_unrestraint = True @@ -373,7 +372,7 @@ class TiramisuOptionPermissive(CommonTiramisuOption): def get(self): """get permissive value for a specified path""" if TIRAMISU_VERSION == 2: - args = [self.setting_properties, self.path] + args = [self.setting_properties, self._path] else: args = [self._get_option(), self.path] return self.settings.getpermissive(*args) @@ -382,9 +381,12 @@ class TiramisuOptionPermissive(CommonTiramisuOption): def set(self, permissives): if TIRAMISU_VERSION == 2: permissive = tuple(permissives) - self.settings.setpermissive(opt=self._get_option(), - path=self.path, - permissives=permissives) + path = self._path + else: + path = self.path + self.settings.setpermissive(opt=self._opt, + path=path, + permissive=permissive) @count def reset(self, path):