From 65c1cdf6b1fc324aa5b16843cc2c0c9b2fc4639a Mon Sep 17 00:00:00 2001 From: David Boreham Date: Tue, 13 Aug 2024 20:47:09 +0000 Subject: [PATCH] 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 Co-authored-by: David Boreham Co-committed-by: David Boreham --- stack_orchestrator/deploy/k8s/cluster_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack_orchestrator/deploy/k8s/cluster_info.py b/stack_orchestrator/deploy/k8s/cluster_info.py index 05443f72..fe953325 100644 --- a/stack_orchestrator/deploy/k8s/cluster_info.py +++ b/stack_orchestrator/deploy/k8s/cluster_info.py @@ -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}")