Skip to content

Commit d67a8d6

Browse files
committed
[ModelicaSystem] check that lmodel is defined as list
1 parent 128af67 commit d67a8d6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

OMPython/ModelicaSystem.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ def __init__(
184184
if lmodel is None:
185185
lmodel = []
186186

187+
if not isinstance(lmodel, list):
188+
raise ModelicaSystemError(f"Invalid input type for lmodel: {type(lmodel)} - list expected!")
189+
187190
self.xmlFile = None
188191
self.lmodel = lmodel # may be needed if model is derived from other model
189192
self.modelName = modelName # Model class name

0 commit comments

Comments
 (0)