Skip to content

Commit 904b292

Browse files
committed
[ModelicaSystem.plot] fix elif usage
1 parent 0f58f65 commit 904b292

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

OMPython/ModelicaSystem.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,11 +1165,11 @@ def plot(
11651165

11661166
if plot_result_file is None:
11671167
raise ModelicaSystemError("No resultfile defined!")
1168-
elif not plot_result_file.is_file():
1168+
if not plot_result_file.is_file():
11691169
raise ModelicaSystemError(f"Provided resultfile {repr(plot_result_file.as_posix())} does not exists!")
1170-
else:
1171-
expr = f'plot({plotdata}, fileName="{plot_result_file.as_posix()}")'
1172-
self.sendExpression(expr=expr)
1170+
1171+
expr = f'plot({plotdata}, fileName="{plot_result_file.as_posix()}")'
1172+
self.sendExpression(expr=expr)
11731173

11741174
def getSolutions(
11751175
self,

0 commit comments

Comments
 (0)