Skip to content

Commit 1beeada

Browse files
committed
[ModelicaSystem] simplify code in xmlparse()
1 parent 0b63a2b commit 1beeada

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

OMPython/ModelicaSystem.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -358,19 +358,11 @@ def xmlparse(self):
358358
scalar["changeable"] = sv.get('isValueChangeable')
359359
scalar["aliasvariable"] = sv.get('aliasVariable')
360360
ch = list(sv)
361-
start = None
362-
min = None
363-
max = None
364-
unit = None
365361
for att in ch:
366-
start = att.get('start')
367-
min = att.get('min')
368-
max = att.get('max')
369-
unit = att.get('unit')
370-
scalar["start"] = start
371-
scalar["min"] = min
372-
scalar["max"] = max
373-
scalar["unit"] = unit
362+
scalar["start"] = att.get('start')
363+
scalar["min"] = att.get('min')
364+
scalar["max"] = att.get('max')
365+
scalar["unit"] = att.get('unit')
374366

375367
if scalar["variability"] == "parameter":
376368
if scalar["name"] in self.overridevariables:

0 commit comments

Comments
 (0)