summaryrefslogtreecommitdiff
path: root/searx/exceptions.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2020-11-03 15:29:59 +0100
committerAlexandre Flament <alex@al-f.net>2020-11-26 18:27:27 +0100
commit1cfe7f2a7543b2994a1afd0d81da1962d04423b0 (patch)
treec850bfcf07280828345fc706ec6becb5ea7b8e61 /searx/exceptions.py
parent6ada5bac60f44a09198c9fec642d5c5939982f88 (diff)
[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
Diffstat (limited to 'searx/exceptions.py')
-rw-r--r--searx/exceptions.py8
1 files changed, 8 insertions, 0 deletions
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