fix: further improvements to exit codes

This commit is contained in:
Matthias
2026-03-29 13:52:51 +02:00
parent c7dfd54eb3
commit 0ed613a574
+2 -1
View File
@@ -63,7 +63,7 @@ def main(sysargv: list[str] | None = None) -> None:
except KeyboardInterrupt: except KeyboardInterrupt:
logger.info("SIGINT received, aborting ...") logger.info("SIGINT received, aborting ...")
return_code = 0 return_code = 130
except ConfigurationError as e: except ConfigurationError as e:
logger.error( logger.error(
f"Configuration error: {e}\n" f"Configuration error: {e}\n"
@@ -74,6 +74,7 @@ def main(sysargv: list[str] | None = None) -> None:
return_code = 2 return_code = 2
except Exception: except Exception:
logger.exception("Fatal exception!") logger.exception("Fatal exception!")
return_code = 1
finally: finally:
sys.exit(return_code) sys.exit(return_code)