From 45dbf5fdc7e3fa5585f47b3ad4689483963205fa Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Wed, 6 Nov 2024 14:08:02 +0100 Subject: [PATCH] fix: checking port on non-grpc mapdl instances --- src/ansys/mapdl/core/cli/list_instances.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ansys/mapdl/core/cli/list_instances.py b/src/ansys/mapdl/core/cli/list_instances.py index 644fa75d00..36d6d5b9df 100644 --- a/src/ansys/mapdl/core/cli/list_instances.py +++ b/src/ansys/mapdl/core/cli/list_instances.py @@ -125,9 +125,13 @@ def get_port(proc): ind_grpc = cmdline.index("-port") return cmdline[ind_grpc + 1] + def is_grpc_based(proc): + cmdline = proc.cmdline() + return "-grpc" in cmdline + table = [] for each_p in mapdl_instances: - if instances and not each_p.ansys_instance: + if not each_p.ansys_instance or not is_grpc_based(each_p): continue proc_line = []