diff --git a/tiramisu/setting.py b/tiramisu/setting.py index 39c4152..746608c 100644 --- a/tiramisu/setting.py +++ b/tiramisu/setting.py @@ -255,13 +255,17 @@ class Property(object): :param propname: a predefined or user defined property name :type propname: string """ + self._append(propname) + + def _append(self, propname, save=True): if self._opt is not None and self._opt.impl_getrequires() is not None \ and propname in self._opt.impl_get_calc_properties(): # pragma: optional cover raise ValueError(_('cannot append {0} property for option {1}: ' 'this property is calculated').format( propname, self._opt.impl_getname())) self._properties.add(propname) - self._setting._setproperties(self._properties, self._path) + if save: + self._setting._setproperties(self._properties, self._path) def remove(self, propname): """Removes a property named propname @@ -280,7 +284,8 @@ class Property(object): :type propnames: iterable of string """ for propname in propnames: - self.append(propname) + self._append(propname, save=False) + self._setting._setproperties(self._properties, self._path) def reset(self): """resets the properties (does not **clear** the properties,