# -*- coding: utf-8 -*-
#
-# Copyright (C) 2008-2020 EDF R&D
+# Copyright (C) 2008-2021 EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Parameters = None,
Script = None):
"Mise a jour d'un concept de calcul"
- if "AlgorithmParameters" not in self.__adaoObject or self.__adaoObject["AlgorithmParameters"] is None:
+ Concept = "AlgorithmParameters"
+ if Concept not in self.__adaoObject or self.__adaoObject[Concept] is None:
raise ValueError("\n\nNo algorithm registred, set one before updating parameters or executing\n")
- self.__adaoObject["AlgorithmParameters"].updateParameters(
+ self.__adaoObject[Concept].updateParameters(
asDict = Parameters,
asScript = self.__with_directory(Script),
)
+ # RaJ du register
return 0
def setRegulationParameters(self,
if os.path.isfile(os.path.join(trypath,fname)):
root, ext = os.path.splitext(fname)
if ext != ".py": continue
- fc = open(os.path.join(trypath,fname)).read()
- iselal = bool("class ElementaryAlgorithm" in fc)
- if iselal and ext == '.py' and root != '__init__':
- files.append(root)
+ with open(os.path.join(trypath,fname)) as fc:
+ iselal = bool("class ElementaryAlgorithm" in fc.read())
+ if iselal and ext == '.py' and root != '__init__':
+ files.append(root)
files.sort()
return files