diff --git a/src/ansys/mapdl/core/mapdl_grpc.py b/src/ansys/mapdl/core/mapdl_grpc.py index 903622b609..3cafff0abf 100644 --- a/src/ansys/mapdl/core/mapdl_grpc.py +++ b/src/ansys/mapdl/core/mapdl_grpc.py @@ -1069,8 +1069,6 @@ def exit(self, save=False, force=False): elif self._exited: # Already exited. return - else: - mapdl_path = self.directory if save: self._log.debug("Saving MAPDL database") @@ -1095,6 +1093,7 @@ def exit(self, save=False, force=False): self._log.debug("Exiting MAPDL") if self._local: + mapdl_path = self.directory self._cache_pids() # Recache processes if os.name == "nt":