pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28738 )


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

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

The "required" param was added in python 3.7.

Change-Id: Ia8d13beeb8da64644d1aaf36deeddda4de889a6c
---
M contrib/cbc-apitool.py
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/38/28738/1

diff --git a/contrib/cbc-apitool.py b/contrib/cbc-apitool.py
index 20d9819..299846a 100755
--- a/contrib/cbc-apitool.py
+++ b/contrib/cbc-apitool.py
@@ -117,7 +117,7 @@
     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)

--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28738
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: Ia8d13beeb8da64644d1aaf36deeddda4de889a6c
Gerrit-Change-Number: 28738
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to