diff --git a/hyakvnc/__main__.py b/hyakvnc/__main__.py index 568dec2..bb18769 100644 --- a/hyakvnc/__main__.py +++ b/hyakvnc/__main__.py @@ -211,12 +211,10 @@ def create_arg_parser(): # kill command parser_stop = subparsers.add_parser('stop', help='Stop specified job') - stop_group = parser_stop.add_mutually_exclusive_group(required=True) - stop_group.add_argument('job_id', metavar='', + parser_stop.add_argument('job_id', metavar='', help='Kill specified VNC session, cancel its VNC job, and exit', type=int) - stop_group.add_argument('-a', '--all', action='store_true', dest='stop_all', help='Stop all VNC sessions and exit') - + parser_stop_all = subparsers.add_parser('stop_all', help='Stop all VNC sessions and exit') return parser @@ -247,6 +245,9 @@ def create_arg_parser(): cmd_status() if args.command == 'stop': - cmd_stop(args.job_id, args.stop_all) + cmd_stop(args.job_id) + +if args.command == 'stop_all': + cmd_stop(stop_all=True) exit(0)