Skip to content

Commit da9deba

Browse files
committed
[ModelicaSystem] do NOT store data in the class workspace
1 parent 630229a commit da9deba

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

OMPython/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,6 @@ def __init__(self, fileName=None, modelName=None, lmodel=None, commandLineOption
646646
raise Exception("Cannot create ModelicaSystem object without any arguments")
647647
return
648648

649-
self.tree = None
650649
self.quantitiesList = []
651650
self.paramlist = {}
652651
self.inputlist = {}
@@ -871,9 +870,8 @@ def requestApi(self, apiName, entity=None, properties=None): # 2
871870

872871
def xmlparse(self):
873872
if (os.path.exists(self.xmlFile)):
874-
self.tree = ET.parse(self.xmlFile)
875-
self.root = self.tree.getroot()
876-
rootCQ = self.root
873+
tree = ET.parse(self.xmlFile)
874+
rootCQ = tree.getroot()
877875
for attr in rootCQ.iter('DefaultExperiment'):
878876
self.simulateOptions["startTime"] = attr.get('startTime')
879877
self.simulateOptions["stopTime"] = attr.get('stopTime')

0 commit comments

Comments
 (0)