summaryrefslogtreecommitdiff
path: root/__main__.py
diff options
context:
space:
mode:
authorAineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi>2024-01-27 13:31:17 +0200
committerAineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi>2024-01-27 13:31:17 +0200
commit53bd62f3a55cde1dce09bdb867dfe0b84d578227 (patch)
tree5a5ed821eedb946eeea117f8fea225ccf00937c5 /__main__.py
parentd68d1a33f52ad9ddeb97c6e45f1e66cdf27c67f5 (diff)
Adding exit codes and batch runner script.
Diffstat (limited to '__main__.py')
-rw-r--r--__main__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/__main__.py b/__main__.py
index edf3888..627f724 100644
--- a/__main__.py
+++ b/__main__.py
@@ -1,4 +1,5 @@
""" __main__.py - Tästä suoritus alkaa """
+import sys
from argparse import ArgumentParser
from app import App
@@ -35,4 +36,7 @@ parser.add_argument(
args = parser.parse_args()
app = App(args)
-app.run()
+is_win = app.run()
+del app
+
+sys.exit(not is_win) # Exit koodeissa 0 on onnistunut suoritus