Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mapdl.get always asking for multiline output when using item3 #2467

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/ansys/mapdl/core/mapdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@
name = method.__func__.__name__.upper()
if not self.geometry:
# Cases where the geometry module is not loaded
return None

Check warning on line 467 in src/ansys/mapdl/core/mapdl.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/mapdl/core/mapdl.py#L467

Added line #L467 was not covered by tests

if name == "NSEL":
return self.mesh.nnum
Expand Down Expand Up @@ -1045,7 +1045,7 @@
"""Return geometry cache"""

if self.legacy_geometry:
from ansys.mapdl.core.mapdl_geometry import LegacyGeometry

Check warning on line 1048 in src/ansys/mapdl/core/mapdl.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/mapdl/core/mapdl.py#L1048

Added line #L1048 was not covered by tests

return LegacyGeometry
else:
Expand Down Expand Up @@ -2114,7 +2114,7 @@
import matplotlib # noqa: F401

return True
except ModuleNotFoundError:

Check warning on line 2117 in src/ansys/mapdl/core/mapdl.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/mapdl/core/mapdl.py#L2117

Added line #L2117 was not covered by tests
return False

@property
Expand Down Expand Up @@ -2860,9 +2860,10 @@

value = response.split("=")[-1].strip()
if item3:
self._log.info(
f"The command '{command}' is showing the next message: '{value.splitlines()[1].strip()}'"
)
if len(value.splitlines()) > 1:
self._log.info(
f"The command '{command}' is showing the next message: '{value.splitlines()[1].strip()}'"
)
value = value.splitlines()[0]

try: # always either a float or string
Expand Down Expand Up @@ -3401,7 +3402,7 @@
elif self._has_matplotlib:
return self._display_plot(plot_path)
else:
self._log.debug(

Check warning on line 3405 in src/ansys/mapdl/core/mapdl.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/mapdl/core/mapdl.py#L3405

Added line #L3405 was not covered by tests
"Since matplolib is not installed, images are not shown."
)

Expand Down
Loading