mirror of
https://github.com/searxng/searxng.git
synced 2025-07-14 00:39:18 +02:00
[feat] hostname replace plugin: support for external list file
This commit is contained in:
parent
3bec04079c
commit
aa59bfbf60
3 changed files with 45 additions and 9 deletions
|
@ -31,6 +31,14 @@ def load_yaml(file_name):
|
|||
raise SearxSettingsException(e, file_name) from e
|
||||
|
||||
|
||||
def get_yaml_file(file_name):
|
||||
path = existing_filename_or_none(join(searx_dir, file_name))
|
||||
if path is None:
|
||||
raise FileNotFoundError(f"File {file_name} does not exist!")
|
||||
|
||||
return load_yaml(path)
|
||||
|
||||
|
||||
def get_default_settings_path():
|
||||
return existing_filename_or_none(join(searx_dir, 'settings.yml'))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue