Change in osmo-cbc[master]: cbc-apitool: compatibility with python < 3.7

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Tue Feb 16 21:12:16 UTC 2021


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


Change subject: cbc-apitool: compatibility with python < 3.7
......................................................................

cbc-apitool: compatibility with python < 3.7

The "required" parameter to argparse.add_subparsers() was only
added in python 3.7.  However, given that it defaults to 'required'
and was always unconditionally required even in python 2.x,
we can safely remove it.

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



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

diff --git a/contrib/cbc-apitool.py b/contrib/cbc-apitool.py
index 7d0fedf..0c5028a 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", default=12345)
     parser.add_argument("-v", "--verbose", help="increase output verbosity", action='count', default=0)
 
-    subparsers = parser.add_subparsers(required=True)
+    subparsers = parser.add_subparsers()
 
     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/+/22941
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: Ia0ffca055f47016fb29ef009acecac2a139e4077
Gerrit-Change-Number: 22941
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210216/f0c9c71a/attachment.htm>


More information about the gerrit-log mailing list