[enh] settings.yml: add use_default_settings option

This change is backward compatible with the existing configurations.

If a settings.yml loaded from an user defined location (SEARX_SETTINGS_PATH or /etc/searx/settings.yml),
then this settings can relied on the default settings.yml with this option:
user_default_settings:True
This commit is contained in:
Alexandre Flament 2020-11-03 15:29:59 +01:00
parent 6ada5bac60
commit 1cfe7f2a75
7 changed files with 312 additions and 29 deletions

View file

@ -31,3 +31,11 @@ class SearxParameterException(SearxException):
self.message = message
self.parameter_name = name
self.parameter_value = value
class SearxSettingsException(SearxException):
def __init__(self, message, filename):
super().__init__(message)
self.message = message
self.filename = filename