remove all properties

This commit is contained in:
2018-09-13 08:28:59 +02:00
parent 620eaa6461
commit e6cbcde927
3 changed files with 21 additions and 8 deletions

View File

@ -657,19 +657,20 @@ class Settings(object):
def reset(self,
option_bag,
context):
context,
all_properties=False):
if option_bag is None:
opt = None
else:
opt = option_bag.option
if all_properties and option_bag:
raise ValueError(_('opt and all_properties must not be set '
'together in reset'))
if opt and opt.impl_is_symlinkoption():
raise TypeError(_("can't reset properties to the symlinkoption \"{}\""
"").format(opt.impl_get_display_name()))
#if all_properties and (path or opt):
# raise ValueError(_('opt and all_properties must not be set '
# 'together in reset'))
#if all_properties:
# self._p_.reset_all_properties()
if all_properties:
self._p_.reset_all_properties()
else:
if opt is not None:
path = option_bag.path