From: Renaud Barate Date: Mon, 16 Jan 2012 10:08:04 +0000 (+0000) Subject: Do not try to generate file from template when JdC is not valid X-Git-Tag: LOGILAB~246 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=81cb93a91d62e89af55b090b11b7b5dc0df0a8f0;p=tools%2Feficas.git Do not try to generate file from template when JdC is not valid --- diff --git a/generator/generator_file_from_template.py b/generator/generator_file_from_template.py index 1fd91b4b..5161d93a 100644 --- a/generator/generator_file_from_template.py +++ b/generator/generator_file_from_template.py @@ -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')