Fix crash if port has int type in yaml
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 33s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m28s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 8m35s
Smoke Test / Run basic test suite (pull_request) Successful in 4m58s
Webapp Test / Run webapp test suite (pull_request) Successful in 5m24s

This commit is contained in:
David Boreham 2024-08-13 14:11:28 -06:00
parent 265699bc38
commit 7ce27ec41b

View File

@ -89,7 +89,7 @@ class ClusterInfo:
for raw_port in service_info["ports"]: for raw_port in service_info["ports"]:
if opts.o.debug: if opts.o.debug:
print(f"service port: {raw_port}") print(f"service port: {raw_port}")
if ":" in raw_port: if type(raw_port) is str and ":" in raw_port:
parts = raw_port.split(":") parts = raw_port.split(":")
if len(parts) != 2: if len(parts) != 2:
raise Exception(f"Invalid port definition: {raw_port}") raise Exception(f"Invalid port definition: {raw_port}")