Skip to content

Commit ffffed1

Browse files
committed
[OMCSessionZMQ] verify that _omc is not None in sendExpression()
1 parent 1bbe520 commit ffffed1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

OMPython/OMCSession.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,9 @@ def sendExpression(self, command, parsed=True):
526526
if p is not None:
527527
raise OMCSessionException("Process Exited, No connection with OMC. Create a new instance of OMCSessionZMQ!")
528528

529+
if self._omc is None:
530+
raise OMCSessionException("No OMC running. Create a new instance of OMCSessionZMQ!")
531+
529532
attempts = 0
530533
while True:
531534
try:

0 commit comments

Comments
 (0)