create image: fix --repo default ip value

rest.URL is the ip and port of the ogServer like: 192.168.56.10:8888,
specified in ogcli.json.

As long as the host and port is specified in rest.URL, split by the ':'
character and extract the ip.

Fixes OpenGnsys clients failing to execute the command due to invalid
repository IP being fed to the underlying bash scripts.
master
Jose M. Guisado 2022-05-16 15:07:37 +02:00
parent 828d6c0ce7
commit d8efd3321c
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ class OgImage():
help='Image description (for new images)')
parser.add_argument('--repo',
nargs='?',
default=urlparse(rest.URL).netloc,
default=urlparse(rest.URL).netloc.split(':')[0],
help='Images repository ip')
group = parser.add_argument_group('clients', 'Client selection args')
group.add_argument('--client-ip',