Revert "[fix] is_werkzeug_reload_active is not realted to python -m"

This reverts commit 3392beb914591cac6e862dab66e4d4911b798800.
This commit is contained in:
Markus Heiser 2025-04-24 17:03:07 +02:00 committed by GitHub
parent 8595e467ce
commit dfe3c0fe2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1383,6 +1383,11 @@ def is_werkzeug_reload_active() -> bool:
if "--reload" in sys.argv or "--debug" in sys.argv:
return True
elif frames[0].filename.endswith('searx/webapp.py'):
# server was launched by "python -m searx.webapp" / see run()
if searx.sxng_debug:
return True
return False