Skip to content

Commit 64b72f3

Browse files
committed
[ModelicaSystem] simplify code in xmlparse()
1 parent f6ac6cb commit 64b72f3

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
@@ -395,19 +395,11 @@ def xmlparse(self):
395395
scalar["changeable"] = sv.get('isValueChangeable')
396396
scalar["aliasvariable"] = sv.get('aliasVariable')
397397
ch = list(sv)
398-
start = None
399-
min = None
400-
max = None
401-
unit = None
402398
for att in ch:
403-
start = att.get('start')
404-
min = att.get('min')
405-
max = att.get('max')
406-
unit = att.get('unit')
407-
scalar["start"] = start
408-
scalar["min"] = min
409-
scalar["max"] = max
410-
scalar["unit"] = unit
399+
scalar["start"] = att.get('start')
400+
scalar["min"] = att.get('min')
401+
scalar["max"] = att.get('max')
402+
scalar["unit"] = att.get('unit')
411403

412404
if scalar["variability"] == "parameter":
413405
if scalar["name"] in self.overridevariables:

0 commit comments

Comments
 (0)