Skip to content
Prev Previous commit
Next Next commit
[ModelicaSystem.plot] fix elif usage
  • Loading branch information
syntron committed Nov 4, 2025
commit 904b292badd22f8f224f8e8d745b08f18312a6ac
8 changes: 4 additions & 4 deletions OMPython/ModelicaSystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1165,11 +1165,11 @@ def plot(

if plot_result_file is None:
raise ModelicaSystemError("No resultfile defined!")
elif not plot_result_file.is_file():
if not plot_result_file.is_file():
raise ModelicaSystemError(f"Provided resultfile {repr(plot_result_file.as_posix())} does not exists!")
else:
expr = f'plot({plotdata}, fileName="{plot_result_file.as_posix()}")'
self.sendExpression(expr=expr)

expr = f'plot({plotdata}, fileName="{plot_result_file.as_posix()}")'
self.sendExpression(expr=expr)

def getSolutions(
self,
Expand Down