From 3802f281dd63d08c1ddf207671953ee0b8106088 Mon Sep 17 00:00:00 2001 From: Solirs Date: Wed, 22 Mar 2023 10:54:19 +0100 Subject: [PATCH] doc: Add and fix comment in get_favicon_or_logo() --- searx/webapp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/searx/webapp.py b/searx/webapp.py index 44e0139a2..60978266b 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -301,6 +301,7 @@ def get_result_template(theme_name: str, template_name: str): def get_favicon_or_logo(imgtype: str, request): # This method returns a favicon or regular image depending on the imgtype parameter # It is used to not repeat code for /favicon.ico and /logo + # Called by logo() and favicon() theme = request.preferences.get_value("theme") path = os.path.expanduser(settings.get("brand").get(imgtype)) relpath = os.path.join(app.root_path, path) @@ -317,7 +318,7 @@ def get_favicon_or_logo(imgtype: str, request): # Otherwise we're good to go, send whatever is specified. filename = os.path.basename(path) path = os.path.dirname(path) - # Works wih both relative and absolute. + # Works with both relative and absolute. return send_from_directory( path, filename,