cbc-apitool: print usage instead of crashing if no subcmd passed

The "required" param was added in python 3.7.

Change-Id: Ia8d13beeb8da64644d1aaf36deeddda4de889a6c
changes/38/28738/2
Pau Espin 6 months ago
parent 01338add1d
commit 028b48b967
  1. 2
      contrib/cbc-apitool.py

@ -117,7 +117,7 @@ def main(argv):
parser.add_argument("-p", "--port", help="TCP port to connect to", type=int, default=12345)
parser.add_argument("-v", "--verbose", help="increase output verbosity", action='count', default=0)
subparsers = parser.add_subparsers()
subparsers = parser.add_subparsers(required=True)
parser_c_cbs = subparsers.add_parser('create-cbs', help='Create a new CBS message')
parser_c_cbs.add_argument("--msg-id", type=int, help='Message Identifier', required=True)

Loading…
Cancel
Save