From 180a5e57d6a9cfbf31dc7b5760ced620677a8008 Mon Sep 17 00:00:00 2001 From: eficas <> Date: Tue, 25 Apr 2006 09:17:40 +0000 Subject: [PATCH] =?utf8?q?PN=20:=20pb=20d=20identation=20des=20MC=20Facteu?= =?utf8?q?rs=20apr=C3=A8s=20un=20bloc?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- generator/generator_python.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/generator/generator_python.py b/generator/generator_python.py index 546f25e2..eba44c8e 100644 --- a/generator/generator_python.py +++ b/generator/generator_python.py @@ -438,11 +438,18 @@ class PythonGenerator: liste=self.generator(v) for mocle in liste : l.append(mocle) + elif isinstance(v,Accas.MCFACT): + liste=self.generator(v) elif isinstance(v,Accas.MCList): liste=self.generator(v) liste[0]=v.nom+'='+liste[0] - for mocle in liste : - l.append(mocle) + # PN essai de correction bug identation + if (hasattr(v,'data')) : + if (isinstance(v.data[0],Accas.MCFACT) and (len(v.data) == 1)): + l.append(liste) + else : + for mocle in liste : + l.append(mocle) else: data=self.generator(v) if type(data) == types.ListType: -- 2.39.2