user could delete informations set in config
This commit is contained in:
parent
a76815dd1f
commit
ef5bcbf98b
|
@ -606,6 +606,9 @@ class _CommonConfig(SubConfig):
|
|||
"""
|
||||
return self._impl_values.get_information(key, default)
|
||||
|
||||
def impl_del_information(self, key, raises=True):
|
||||
self._impl_values.del_information(key, raises)
|
||||
|
||||
# ----- state
|
||||
def __getstate__(self):
|
||||
if self._impl_meta is not None:
|
||||
|
|
|
@ -235,6 +235,13 @@ class Values(Cache):
|
|||
" not found: {0}").format(key))
|
||||
return value
|
||||
|
||||
def del_information(self, key, raises):
|
||||
if key in self._informations:
|
||||
del(self._informations[key])
|
||||
else:
|
||||
if raises:
|
||||
raise ValueError(_("information's item not found {0}").format(key))
|
||||
|
||||
def exportation(self, session, fake=False):
|
||||
return self._values
|
||||
|
||||
|
|
|
@ -599,6 +599,9 @@ class Values(object):
|
|||
"""
|
||||
return self._p_.get_information(key, default)
|
||||
|
||||
def del_information(self, key, raises=True):
|
||||
self._p_.del_information(key, raises)
|
||||
|
||||
def mandatory_warnings(self, force_permissive=False, validate=True):
|
||||
"""convenience function to trace Options that are mandatory and
|
||||
where no value has been set
|
||||
|
|
Loading…
Reference in New Issue