From 1cfe7f2a7543b2994a1afd0d81da1962d04423b0 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Tue, 3 Nov 2020 15:29:59 +0100 Subject: [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 --- searx/exceptions.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'searx/exceptions.py') diff --git a/searx/exceptions.py b/searx/exceptions.py index 4af816272..2d1b1167e 100644 --- a/searx/exceptions.py +++ b/searx/exceptions.py @@ -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 -- cgit v1.2.3