]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 5 Jun 2023 21:32:04 +0000 (23:32 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 5 Jun 2023 21:32:32 +0000 (23:32 +0200)
- exit with returned status code

fba.py
fba/boot.py

diff --git a/fba.py b/fba.py
index d7d40c71592bde40306191b4a8901a34a7a76477..ae068135390112454dd5232e2a530835eeda5f1c 100755 (executable)
--- a/fba.py
+++ b/fba.py
@@ -24,7 +24,10 @@ from fba import *
 boot.init_parser()
 
 # Run command
-boot.run_command()
+status = boot.run_command()
 
 # Shutdown again
 boot.shutdown()
+
+# Exit with status code
+sys.exit(status)
index db3bb11c9b08cb890fd24f29c6e828192099c251..1a89741fbcdc23aebff61148f989f679b08ebffe 100644 (file)
@@ -113,8 +113,9 @@ def run_command():
     # DEBUG: print("DEBUG: run_command(): CALLED!")
     args = _PARSER.parse_args()
     print(f"DEBUG: args[{type(args)}]={args}")
-    args.command(args)
-    # DEBUG: print("DEBUG: run_command(): EXIT!")
+    status = int(args.command(args))
+    # DEBUG: print("DEBUG: status={status} - EXIT!")
+    return status
 
 def shutdown():
     print("DEBUG: Closing database connection ...")