Skip to content

Commit

Permalink
fix: checking port on non-grpc mapdl instances (#3540)
Browse files Browse the repository at this point in the history
* fix: checking port on non-grpc mapdl instances

* chore: adding changelog file 3540.fixed.md [dependabot-skip]

---------

Co-authored-by: pyansys-ci-bot <[email protected]>
  • Loading branch information
germa89 and pyansys-ci-bot authored Nov 7, 2024
1 parent 21e52c8 commit baa7ac0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/changelog.d/3540.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix: checking port on non-grpc mapdl instances
6 changes: 5 additions & 1 deletion src/ansys/mapdl/core/cli/list_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down

0 comments on commit baa7ac0

Please sign in to comment.