remove all properties
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user