Skip to content

Commit 2574485

Browse files
committed
Rename _xmlFile to _xml_file
1 parent dcaf2cf commit 2574485

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

OMPython/ModelicaSystem.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def __init__(
383383
if not isinstance(lmodel, list):
384384
raise ModelicaSystemError(f"Invalid input type for lmodel: {type(lmodel)} - list expected!")
385385

386-
self._xmlFile = None
386+
self._xml_file = None
387387
self._lmodel = lmodel # may be needed if model is derived from other model
388388
self._modelName = modelName # Model class name
389389
self._fileName = pathlib.Path(fileName).resolve() if fileName is not None else None # Model file/package name
@@ -482,7 +482,7 @@ def buildModel(self, variableFilter: Optional[str] = None):
482482
buildModelResult = self._requestApi("buildModel", self._modelName, properties=varFilter)
483483
logger.debug("OM model build result: %s", buildModelResult)
484484

485-
self._xmlFile = pathlib.Path(buildModelResult[0]).parent / buildModelResult[1]
485+
self._xml_file = pathlib.Path(buildModelResult[0]).parent / buildModelResult[1]
486486
self._xmlparse()
487487

488488
def sendExpression(self, expr: str, parsed: bool = True):
@@ -510,10 +510,10 @@ def _requestApi(self, apiName, entity=None, properties=None): # 2
510510
return self.sendExpression(exp)
511511

512512
def _xmlparse(self):
513-
if not self._xmlFile.is_file():
514-
raise ModelicaSystemError(f"XML file not generated: {self._xmlFile}")
513+
if not self._xml_file.is_file():
514+
raise ModelicaSystemError(f"XML file not generated: {self._xml_file}")
515515

516-
tree = ET.parse(self._xmlFile)
516+
tree = ET.parse(self._xml_file)
517517
rootCQ = tree.getroot()
518518
for attr in rootCQ.iter('DefaultExperiment'):
519519
for key in ("startTime", "stopTime", "stepSize", "tolerance",
@@ -1396,7 +1396,7 @@ def load_module_from_path(module_name, file_path):
13961396

13971397
return module_def
13981398

1399-
if self._xmlFile is None:
1399+
if self._xml_file is None:
14001400
raise ModelicaSystemError(
14011401
"Linearization cannot be performed as the model is not build, "
14021402
"use ModelicaSystem() to build the model first"

0 commit comments

Comments
 (0)