better handling starting parameters
This commit is contained in:
parent
2d3313e734
commit
b80f6559a7
1 changed files with 3 additions and 3 deletions
|
@ -93,6 +93,7 @@ def main() -> None:
|
||||||
# client_parser.add_argument("--key", "-k", default=None)
|
# client_parser.add_argument("--key", "-k", default=None)
|
||||||
client_parser.add_argument("--server", "-S")
|
client_parser.add_argument("--server", "-S")
|
||||||
|
|
||||||
|
if GUI_AVAILABLE:
|
||||||
sub_parsers.add_parser("gui")
|
sub_parsers.add_parser("gui")
|
||||||
|
|
||||||
if SERVER_AVAILABLE:
|
if SERVER_AVAILABLE:
|
||||||
|
@ -112,9 +113,8 @@ def main() -> None:
|
||||||
elif args.action == "server":
|
elif args.action == "server":
|
||||||
run_server(args)
|
run_server(args)
|
||||||
elif args.action == "gui":
|
elif args.action == "gui":
|
||||||
if not GUI_AVAILABLE:
|
run_gui()
|
||||||
print("GUI is not available")
|
else:
|
||||||
return
|
|
||||||
run_gui()
|
run_gui()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue