Skip to content

Commit 96a797f

Browse files
committed
[OMCSessionCmd] use OMCSession (old OMCProcess)
1 parent b749545 commit 96a797f

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
@@ -70,9 +70,9 @@ class OMCSessionCmd:
7070
Implementation of Open Modelica Compiler API functions. Depreciated!
7171
"""
7272

73-
def __init__(self, session: OMCSessionZMQ, readonly: bool = False):
74-
if not isinstance(session, OMCSessionZMQ):
75-
raise OMCSessionException("Invalid session definition!")
73+
def __init__(self, session: OMCSession, readonly: bool = False):
74+
if not isinstance(session, OMCSession):
75+
raise OMCSessionException("Invalid OMC process definition!")
7676
self._session = session
7777
self._readonly = readonly
7878
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)