Skip to content

Commit d585207

Browse files
syntronadeas31
andauthored
[ModelicaSystemCmd] define arg_get() (#310)
Co-authored-by: Adeel Asghar <[email protected]>
1 parent b50fc09 commit d585207

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

OMPython/ModelicaSystem.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,15 @@ def arg_set(self, key: str, val: Optional[str | dict] = None) -> None:
167167
f"(was: {repr(self._args[key])})")
168168
self._args[key] = argval
169169

170+
def arg_get(self, key: str) -> Optional[str | dict]:
171+
"""
172+
Return the value for the given key
173+
"""
174+
if key in self._args:
175+
return self._args[key]
176+
177+
return None
178+
170179
def args_set(self, args: dict[str, Optional[str | dict[str, str]]]) -> None:
171180
"""
172181
Define arguments for the model executable.

0 commit comments

Comments
 (0)