From: Jean-Philippe ARGAUD Date: Tue, 11 Feb 2014 14:19:12 +0000 (+0100) Subject: Changing the required of the debug variable to optional X-Git-Tag: V7_4_0rc1~17^2~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=342c799e611e5460e1c42eb50f898e24e6736fbf;p=modules%2Fadao.git Changing the required of the debug variable to optional --- diff --git a/doc/en/reference.rst b/doc/en/reference.rst index dd35f17..eb64f0f 100644 --- a/doc/en/reference.rst +++ b/doc/en/reference.rst @@ -151,7 +151,7 @@ following: control, it has to be a void string ''. **Debug** - *Required command*. This define the level of trace and intermediary debug + *Optional command*. This define the level of trace and intermediary debug information. The choices are limited between 0 (for False) and 1 (for True). @@ -724,7 +724,7 @@ commands are the following: :math:`\mathbf{x}^b`. It is defined as a "*Vector*" type object. **Debug** - *Required command*. This define the level of trace and intermediary debug + *Optional command*. This define the level of trace and intermediary debug information. The choices are limited between 0 (for False) and 1 (for True). diff --git a/doc/fr/reference.rst b/doc/fr/reference.rst index f07ec3b..5c4701f 100644 --- a/doc/fr/reference.rst +++ b/doc/fr/reference.rst @@ -161,7 +161,7 @@ le calcul ou la v être une chaîne vide ''. **Debug** - *Commande obligatoire*. Elle définit le niveau de sorties et d'informations + *Commande optionnelle*. Elle définit le niveau de sorties et d'informations intermédiaires de débogage. Les choix sont limités entre 0 (pour False) and 1 (pour True). @@ -757,7 +757,7 @@ v :math:`\mathbf{x}`. Sa valeur est définie comme un objet de type "*Vector*". **Debug** - *Commande obligatoire*. Elle définit le niveau de sorties et d'informations + *Commande optionnelle*. Elle définit le niveau de sorties et d'informations intermédiaires de débogage. Les choix sont limités entre 0 (pour False) et 1 (pour True). diff --git a/src/daEficas/generator_adao.py b/src/daEficas/generator_adao.py index 98dbb99..6cbadde 100644 --- a/src/daEficas/generator_adao.py +++ b/src/daEficas/generator_adao.py @@ -104,7 +104,10 @@ class AdaoGenerator(PythonGenerator): # Extraction de Study_name self.text_da += "study_config['Name'] = '" + self.dictMCVal["__"+self.type_of_study+"__Study_name"] + "'\n" # Extraction de Debug - self.text_da += "study_config['Debug'] = '" + str(self.dictMCVal["__"+self.type_of_study+"__Debug"]) + "'\n" + if "__"+self.type_of_study+"__Debug" in self.dictMCVal.keys(): + self.text_da += "study_config['Debug'] = '" + str(self.dictMCVal["__"+self.type_of_study+"__Debug"]) + "'\n" + else: + self.text_da += "study_config['Debug'] = '0'\n" # Extraction de Algorithm self.text_da += "study_config['Algorithm'] = '" + self.dictMCVal["__"+self.type_of_study+"__Algorithm"] + "'\n" diff --git a/src/daSalome/daYacsSchemaCreator/methods.py b/src/daSalome/daYacsSchemaCreator/methods.py index 2328dbb..dde7d22 100644 --- a/src/daSalome/daYacsSchemaCreator/methods.py +++ b/src/daSalome/daYacsSchemaCreator/methods.py @@ -69,10 +69,10 @@ def create_yacs_proc(study_config): CAS_node = factory_CAS_node.cloneNode("CreateAssimilationStudy") CAS_node.getInputPort("Name").edInitPy(study_config["Name"]) CAS_node.getInputPort("Algorithm").edInitPy(study_config["Algorithm"]) - if study_config["Debug"] == "0": - CAS_node.getInputPort("Debug").edInitPy(False) - else: + if study_config.has_key("Debug") and study_config["Debug"] == "1": CAS_node.getInputPort("Debug").edInitPy(True) + else: + CAS_node.getInputPort("Debug").edInitPy(False) # Ajout des Variables InputVariablesNames = []