fix: improved sysexit handling

closes #12988
This commit is contained in:
Matthias
2026-03-29 13:28:36 +02:00
parent d5417d40ae
commit 697814ed6a
+1 -4
View File
@@ -6,7 +6,6 @@ Read the documentation to know what cli arguments you need.
import logging
import sys
from typing import Any
# check min. python version
@@ -35,7 +34,7 @@ def main(sysargv: list[str] | None = None) -> None:
:return: None
"""
return_code: Any = 1
return_code: int | None = None
try:
setup_logging_pre()
asyncio_setup()
@@ -62,8 +61,6 @@ def main(sysargv: list[str] | None = None) -> None:
"`freqtrade --help` or `freqtrade <command> --help`."
)
except SystemExit as e: # pragma: no cover
return_code = e
except KeyboardInterrupt:
logger.info("SIGINT received, aborting ...")
return_code = 0