]> SALOME platform Git repositories - tools/eficas.git/commitdiff
Salome HOME
Do not try to generate file from template when JdC is not valid
authorRenaud Barate <renaud.barate@edf.fr>
Mon, 16 Jan 2012 10:08:04 +0000 (10:08 +0000)
committerRenaud Barate <renaud.barate@edf.fr>
Mon, 16 Jan 2012 10:08:04 +0000 (10:08 +0000)
generator/generator_file_from_template.py

index 1fd91b4bffd229511469e7b35413e86277db9376..5161d93a2932eee836c44d02db463b1fd3b4a82c 100644 (file)
@@ -49,7 +49,6 @@ class FileFromTemplateGenerator(PythonGenerator):
         self.config = config
         self.kw_dict = {}
         self.text = PythonGenerator.gener(self, obj, format)
-        self.generate_output_from_template()
         return self.text
     
     def generate_output_from_template(self) :
@@ -87,6 +86,7 @@ class FileFromTemplateGenerator(PythonGenerator):
         return result
     
     def writeDefault(self, basefilename):
+        self.generate_output_from_template()
         output_filename = os.path.splitext(basefilename)[0] + \
                           self.config.get_extension()
         f = open(output_filename, 'w')