[fix] CI task "update_engine_traits.py" fails (#5069)

* [fix] CI task "update_engine_traits.py" fails

To catch all problems with an HTTP request, the more general class
``httpx.HTTPError`` must be caught, for your test use::

    $ ./manage dev.env
    $ python ./searxng_extra/update/update_engine_traits.py

Closes: https://github.com/searxng/searxng/issues/5068

* [data] update searx.data - update_engine_traits.py
This commit is contained in:
Markus Heiser
2025-08-01 12:08:27 +02:00
committed by GitHub
parent dcb1e20007
commit 664aab0ec9
2 changed files with 13 additions and 13 deletions

View File

@@ -193,7 +193,7 @@ def fetch_traits(engine_traits: EngineTraits) -> None:
try:
resp = get(base_url, verify=False)
except (SearxException, httpx.ConnectError) as exc:
except (SearxException, httpx.HTTPError) as exc:
print(f"ERROR: zlibrary domain '{base_url}' is seized?")
print(f" --> {exc}")
_use_old_values()