Skip to content

Commit 24cdf05

Browse files
committed
[OMCSession] improve logging
1 parent 0e6ff4f commit 24cdf05

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

OMPython/OMCSession.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -702,8 +702,8 @@ def __del__(self):
702702
if isinstance(self._omc_zmq, zmq.Socket):
703703
try:
704704
self.sendExpression("quit()")
705-
except OMCSessionException:
706-
pass
705+
except OMCSessionException as exc:
706+
logger.warning(f"Exception on sending 'quit()' to OMC: {exc}! Continue nevertheless ...")
707707
finally:
708708
self._omc_zmq = None
709709

@@ -720,7 +720,7 @@ def __del__(self):
720720
self._omc_process.wait(timeout=2.0)
721721
except subprocess.TimeoutExpired:
722722
if self._omc_process:
723-
logger.warning("OMC did not exit after being sent the quit() command; "
723+
logger.warning("OMC did not exit after being sent the 'quit()' command; "
724724
"killing the process with pid=%s", self._omc_process.pid)
725725
self._omc_process.kill()
726726
self._omc_process.wait()

0 commit comments

Comments
 (0)