Skip to content

Commit

Permalink
Avoing logging operations on a closed file at exiting. (#2615)
Browse files Browse the repository at this point in the history
  • Loading branch information
germa89 authored Jan 5, 2024
1 parent 2dea105 commit 2abc2c4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ansys/mapdl/core/mapdl_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,13 @@ def _kill_server(self):
a local process.
"""
self._log.debug("Killing MAPDL server")
try:
self._log.debug("Killing MAPDL server")
except ValueError:
# It might throw ValueError: I/O operation on closed file.
# if the logger already exited.
pass

if (
self._version >= 24.2
): # We can't use the non-cached version because of recursion error.
Expand Down

0 comments on commit 2abc2c4

Please sign in to comment.