ability to disable warnings validation
This commit is contained in:
@ -581,9 +581,11 @@ class Option(OnlyOption):
|
||||
if warning:
|
||||
msg = _("warning on the value of the option {0}: {1}").format(
|
||||
self.impl_getname(), warning)
|
||||
warnings.warn_explicit(ValueWarning(msg, self),
|
||||
ValueWarning,
|
||||
self.__class__.__name__, 0)
|
||||
if context is None or 'warnings' in \
|
||||
context.cfgimpl_get_settings():
|
||||
warnings.warn_explicit(ValueWarning(msg, self),
|
||||
ValueWarning,
|
||||
self.__class__.__name__, 0)
|
||||
elif error:
|
||||
raise ValueError(_("invalid value for option {0}: {1}").format(
|
||||
self.impl_getname(), error))
|
||||
|
Reference in New Issue
Block a user