Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions OMPython/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,6 @@ def __init__(self, fileName=None, modelName=None, lmodel=None, commandLineOption
if fileName is None and modelName is None and not lmodel: # all None
raise Exception("Cannot create ModelicaSystem object without any arguments")

self.tree = None
self.quantitiesList = []
self.paramlist = {}
self.inputlist = {}
Expand Down Expand Up @@ -842,9 +841,8 @@ def xmlparse(self):
self._raise_error(errstr=f"XML file not generated: {self.xmlFile}")
return

self.tree = ET.parse(self.xmlFile)
self.root = self.tree.getroot()
rootCQ = self.root
tree = ET.parse(self.xmlFile)
rootCQ = tree.getroot()
for attr in rootCQ.iter('DefaultExperiment'):
for key in ("startTime", "stopTime", "stepSize", "tolerance",
"solver", "outputFormat"):
Expand Down
Loading