Skip to content

Commit 331e0a3

Browse files
committed
[OMCSession] improve logging
1 parent fa97850 commit 331e0a3

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
@@ -731,8 +731,8 @@ def __del__(self):
731731
if isinstance(self._omc_zmq, zmq.Socket):
732732
try:
733733
self.sendExpression("quit()")
734-
except OMCSessionException:
735-
pass
734+
except OMCSessionException as exc:
735+
logger.warning(f"Exception on sending 'quit()' to OMC: {exc}! Continue nevertheless ...")
736736
finally:
737737
self._omc_zmq = None
738738

@@ -749,7 +749,7 @@ def __del__(self):
749749
self._omc_process.wait(timeout=2.0)
750750
except subprocess.TimeoutExpired:
751751
if self._omc_process:
752-
logger.warning("OMC did not exit after being sent the quit() command; "
752+
logger.warning("OMC did not exit after being sent the 'quit()' command; "
753753
"killing the process with pid=%s", self._omc_process.pid)
754754
self._omc_process.kill()
755755
self._omc_process.wait()

0 commit comments

Comments
 (0)