mirror of
https://github.com/lucaspalomodevelop/Party.git
synced 2026-03-13 08:09:37 +00:00
exit on not using run.sh script
This commit is contained in:
parent
c0a81f8af7
commit
0a4234c2ee
8
main.py
8
main.py
@ -1,10 +1,17 @@
|
||||
""" used for argument parsing and starting the server """
|
||||
import os
|
||||
import argparse
|
||||
from server import server
|
||||
from database import mate_erstellen
|
||||
|
||||
def main():
|
||||
""" entrypoint to program """
|
||||
|
||||
# check if run with run.sh
|
||||
if os.getenv('RUN_WITH_SH') != '1':
|
||||
print("Bitte starte das Programm mit dem Startskript `run.sh`!")
|
||||
exit(1)
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
prog = 'Party Controller',
|
||||
description = 'Manage LAN Parties',
|
||||
@ -29,5 +36,6 @@ def main():
|
||||
else:
|
||||
parser.print_help()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
exit(main())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user