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("--server", "-S")
|
||||
|
||||
if GUI_AVAILABLE:
|
||||
sub_parsers.add_parser("gui")
|
||||
|
||||
if SERVER_AVAILABLE:
|
||||
|
@ -112,9 +113,8 @@ def main() -> None:
|
|||
elif args.action == "server":
|
||||
run_server(args)
|
||||
elif args.action == "gui":
|
||||
if not GUI_AVAILABLE:
|
||||
print("GUI is not available")
|
||||
return
|
||||
run_gui()
|
||||
else:
|
||||
run_gui()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue