Skip to content

Commit dcb23b0

Browse files
germa89akaszynski
andauthored
Fixing using clear_on_connect (#1271)
* fixing using clear_on_connect * Update src/ansys/mapdl/core/launcher.py * Fixing coverage Co-authored-by: Alex Kaszynski <[email protected]>
1 parent eb5bbc9 commit dcb23b0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/ansys/mapdl/core/launcher.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,9 +1073,9 @@ def launch_mapdl(
10731073
environment variable "PYMAPDL_IP=FALSE".
10741074
10751075
clear_on_connect : bool, optional
1076-
Used only when ``start_instance`` is ``False``. Defaults to
1077-
``True``, giving you a fresh environment when connecting to
1078-
MAPDL.
1076+
Defaults to ``True``, giving you a fresh environment when
1077+
connecting to MAPDL. When if ``start_instance`` is specified
1078+
it defaults to ``False``.
10791079
10801080
log_apdl : str, optional
10811081
Enables logging every APDL command to the local disk. This
@@ -1318,7 +1318,10 @@ def launch_mapdl(
13181318
return mapdl
13191319

13201320
if not start_instance:
1321-
return MapdlGrpc(
1321+
if clear_on_connect is None: # pragma: no cover
1322+
clear_on_connect = False
1323+
1324+
mapdl = MapdlGrpc(
13221325
ip=ip,
13231326
port=port,
13241327
cleanup_on_exit=False,

0 commit comments

Comments
 (0)