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
This commit is contained in:
Pau Espin 2022-07-22 17:58:26 +02:00
parent a97e166ee7
commit 01338add1d
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ def main(argv):
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()