diff --git a/doc/changelog.d/3540.fixed.md b/doc/changelog.d/3540.fixed.md new file mode 100644 index 0000000000..b524a5f16d --- /dev/null +++ b/doc/changelog.d/3540.fixed.md @@ -0,0 +1 @@ +fix: checking port on non-grpc mapdl instances \ No newline at end of file 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 = []