Skip to content

Commit 6313dd6

Browse files
committed
[OMCSessionCmd] use OMCSession (old OMCProcess)
1 parent fc04903 commit 6313dd6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

OMPython/OMCSession.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ class OMCSessionCmd:
9999
Implementation of Open Modelica Compiler API functions. Depreciated!
100100
"""
101101

102-
def __init__(self, session: OMCSessionZMQ, readonly: bool = False):
103-
if not isinstance(session, OMCSessionZMQ):
104-
raise OMCSessionException("Invalid session definition!")
102+
def __init__(self, session: OMCSession, readonly: bool = False):
103+
if not isinstance(session, OMCSession):
104+
raise OMCSessionException("Invalid OMC process definition!")
105105
self._session = session
106106
self._readonly = readonly
107107
self._omc_cache: dict[tuple[str, bool], Any] = {}

tests/test_OMSessionCmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
def test_isPackage():
55
omczmq = OMPython.OMCSessionZMQ()
6-
omccmd = OMPython.OMCSessionCmd(session=omczmq)
6+
omccmd = OMPython.OMCSessionCmd(session=omczmq.omc_process)
77
assert not omccmd.isPackage('Modelica')
88

99

0 commit comments

Comments
 (0)