Fix crash if port has int type in yaml (#918)

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/918
Reviewed-by: Thomas E Lackey <telackey@noreply.git.vdb.to>
Co-authored-by: David Boreham <david@bozemanpass.com>
Co-committed-by: David Boreham <david@bozemanpass.com>
telackey/defaultplatform v1.1.0-65c1cdf-202408132047
David Boreham 2024-08-13 20:47:09 +00:00 committed by Thomas E Lackey
parent 265699bc38
commit 65c1cdf6b1
1 changed files with 1 additions and 1 deletions

View File

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