Skip to content

Commit 5624b6c

Browse files
committed
(E002) prepare restructure
[ModelicaSystemCmd] add missing docstring [OMCSession] spelling fixes [OMCSessionCmd] add warning about depreciated class [OMCSessionABC] remove duplicated code; see OMSessionABC [OMSessionRunnerABC] define class [OMCSessionZMQ] call super()__init__() [OMCPath] fix forward dependency on OMCSessionLocal [OMSessionException] rename from OMCSessionException [__init__] fix imports
1 parent a73e331 commit 5624b6c

File tree

3 files changed

+121
-107
lines changed

3 files changed

+121
-107
lines changed

OMPython/ModelicaSystem.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
ModelExecutionData,
2626
ModelExecutionException,
2727

28-
OMCSessionException,
28+
OMSessionException,
2929
OMCSessionLocal,
3030

3131
OMPathABC,
@@ -1681,7 +1681,7 @@ def sendExpression(self, expr: str, parsed: bool = True) -> Any:
16811681
"""
16821682
try:
16831683
retval = self._session.sendExpression(expr=expr, parsed=parsed)
1684-
except OMCSessionException as ex:
1684+
except OMSessionException as ex:
16851685
raise ModelicaSystemError(f"Error executing {repr(expr)}: {ex}") from ex
16861686

16871687
logger.debug(f"Result of executing {repr(expr)}: {textwrap.shorten(repr(retval), width=100)}")
@@ -2822,7 +2822,9 @@ def _prepare_structure_parameters(
28222822

28232823

28242824
class ModelicaSystemCmd(ModelExecutionCmd):
2825-
# TODO: docstring
2825+
"""
2826+
Compatibility class; in the new version it is renamed as MOdelExecutionCmd.
2827+
"""
28262828

28272829
def __init__(
28282830
self,

0 commit comments

Comments
 (0)