fix: further improvements to exit codes
This commit is contained in:
+2
-1
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user