summaryrefslogtreecommitdiff
path: root/searx/favicons/cache.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2024-10-29 17:32:30 +0100
committerMarkus Heiser <markus.heiser@darmarIT.de>2024-10-29 18:22:22 +0100
commitfa4dfd4efea01d558dd4c8b0d6db39708ee03917 (patch)
treecf3cc24426da2a94f8e45fe66283cccd285e7cbc /searx/favicons/cache.py
parentb183e620d83892191895227b5a4207d619eb2646 (diff)
downloadsearxng-fa4dfd4efea01d558dd4c8b0d6db39708ee03917.tar.gz
searxng-fa4dfd4efea01d558dd4c8b0d6db39708ee03917.zip
[fix] favicons: msgspec.ValidationError: Expected `Path`, got `str` - at `$.favicons.cache.db_url`
Closes: https://github.com/searxng/searxng/issues/3975 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/favicons/cache.py')
-rw-r--r--searx/favicons/cache.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/favicons/cache.py b/searx/favicons/cache.py
index c46eb5621..1aa722d89 100644
--- a/searx/favicons/cache.py
+++ b/searx/favicons/cache.py
@@ -20,11 +20,11 @@
from __future__ import annotations
from typing import Literal
+import os
import abc
import dataclasses
import hashlib
import logging
-import pathlib
import sqlite3
import tempfile
import time
@@ -103,7 +103,7 @@ class FaviconCacheConfig(msgspec.Struct): # pylint: disable=too-few-public-meth
:py:obj:`.cache.FaviconCacheMEM` (not recommended)
"""
- db_url: pathlib.Path = pathlib.Path(tempfile.gettempdir()) / "faviconcache.db"
+ db_url: str = tempfile.gettempdir() + os.sep + "faviconcache.db"
"""URL of the SQLite DB, the path to the database file."""
HOLD_TIME: int = 60 * 60 * 24 * 30 # 30 days