]> git.ipfire.org Git - nitsi.git/blobdiff - nitsi.in
Fix return codes once again
[nitsi.git] / nitsi.in
index f45dbe637fcf129aa03298e293cecc0f73851065..fc1ce8e0af9f2b0ee5fa44f37fd2989752cacebc 100755 (executable)
--- a/nitsi.in
+++ b/nitsi.in
@@ -1,13 +1,11 @@
 #!/usr/bin/python3
 
-from nitsi.test import test
-from nitsi.logger import init_logging
-import logging
 import argparse
+import logging
 
+from nitsi.logger import init_logging
 from nitsi.recipe import RecipeExeption
-
-from nitsi.test import TestException
+from nitsi.test import TestException, test
 
 logger = logging.getLogger("nitsi")
 logger.setLevel(logging.DEBUG)
@@ -51,7 +49,7 @@ def main():
         currenttest.load_recipe()
     except RecipeExeption as e:
         logger.exception(e)
-        exit(2)
+        return 2
 
     try:
         currenttest.virtual_environ_start()
@@ -68,4 +66,6 @@ def main():
     return 0
 
 if __name__ == "__main__":
-    main()
\ No newline at end of file
+   return_value = main()
+   logger.debug("Return value of main is: {}".format(return_value))
+   exit(return_value)