pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28737 )

Change subject: cbc-apitool: Fix port stored in var as a string
......................................................................

cbc-apitool: Fix port stored in var as a string

Passing "-p 12345" on the cmd line, fixes:
"""
  File "/osmo-cbc/contrib/./cbc-apitool.py", line 20, in build_url
    return "http://%s:%u%s%s"; % (server_host, server_port, BASE_PATH, suffix)
TypeError: %u format: a real number is required, not str
"""

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

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved
  laforge: Looks good to me, approved



diff --git a/contrib/cbc-apitool.py b/contrib/cbc-apitool.py
index 0c5028a..20d9819 100755
--- a/contrib/cbc-apitool.py
+++ b/contrib/cbc-apitool.py
@@ -114,7 +114,7 @@

     parser = argparse.ArgumentParser()
     parser.add_argument("-H", "--host", help="Host to connect to", 
default="localhost")
-    parser.add_argument("-p", "--port", help="TCP port to connect to", 
default=12345)
+    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()

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

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: Ief688bb8c2a6cfa410608a6896ce3cb5df4eb48e
Gerrit-Change-Number: 28737
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to