From 17d1e9949b0782787223a20b35d208839b90b8db Mon Sep 17 00:00:00 2001 From: German Date: Thu, 2 Nov 2023 15:32:14 +0100 Subject: [PATCH] Fix always asking for multiline output. --- src/ansys/mapdl/core/mapdl.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ansys/mapdl/core/mapdl.py b/src/ansys/mapdl/core/mapdl.py index 1a526b2aaa..4241311754 100644 --- a/src/ansys/mapdl/core/mapdl.py +++ b/src/ansys/mapdl/core/mapdl.py @@ -2860,9 +2860,10 @@ def get( 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