From: pascale.noyret Date: Fri, 30 Sep 2016 07:00:05 +0000 (+0200) Subject: bug JPA X-Git-Tag: V8_1_0~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=58ea3179b945b347c17252bc870550e89420d0bd;p=tools%2Feficas.git bug JPA --- diff --git a/InterfaceQT4/editor.py b/InterfaceQT4/editor.py index 70ede6ba..80f10350 100755 --- a/InterfaceQT4/editor.py +++ b/InterfaceQT4/editor.py @@ -865,7 +865,7 @@ class JDCEditor(Ui_baseWidget,QWidget): return 0 #-----------------------------------------------------------# - def get_text_JDC(self,format,pourRun=0,formatLigne="beautifie",appli=None): + def get_text_JDC(self,format,pourRun=0,formatLigne="beautifie"): #-----------------------------------------------------------# if self.code == "MAP" and not(generator.plugins.has_key(format)): format = "MAP" if generator.plugins.has_key(format): diff --git a/generator/generator_PSEN.py b/generator/generator_PSEN.py index 30daec50..19fbcea1 100755 --- a/generator/generator_PSEN.py +++ b/generator/generator_PSEN.py @@ -53,19 +53,20 @@ class PSENGenerator(DicoImbriqueGenerator): extensions=('.comm',) #---------------------------------------------------------------------------------------- - def gener(self,obj,format='brut',config=None): + def gener(self,obj,format='brut',config=None, appli=None): - print "je passe dans gener" try : self.MachineDico = obj.MachineDico self.LoadDico = obj.LoadDico self.LineDico = obj.LineDico self.TransfoDico = obj.TransfoDico + self.MotorDico = obj.MotorDico except : self.MachineDico = None self.LoadDico = None self.LineDico = None self.TransfoDico = None + self.MotorDico = None self.initDico() # Cette instruction genere le contenu du fichier de commandes (persistance) @@ -83,6 +84,7 @@ class PSENGenerator(DicoImbriqueGenerator): self.Entete += 'LoadDico = ' + str(self.LoadDico) +'\n' self.Entete += 'LineDico = ' + str(self.LineDico) +'\n' self.Entete += 'TransfoDico = ' + str(self.TransfoDico) +'\n' + self.Entete += 'MotorDico = ' + str(self.MotorDico) + '\n' self.Entete +='\n' diff --git a/generator/generator_aplat.py b/generator/generator_aplat.py index 2935310b..d54299b0 100644 --- a/generator/generator_aplat.py +++ b/generator/generator_aplat.py @@ -85,7 +85,7 @@ class AplatGenerator: fp.write(self.text) fp.close() - def gener(self,obj,format='brut',config=None): + def gener(self,obj,format='brut',config=None,appli=None): """ Retourne une représentation du JDC obj sous une forme qui est paramétrée par format. Si format vaut 'brut', 'standard' ou 'beautifie', retourne le texte issu de generator diff --git a/generator/generator_dico.py b/generator/generator_dico.py index 5de4c9e0..a3f752e9 100644 --- a/generator/generator_dico.py +++ b/generator/generator_dico.py @@ -49,7 +49,7 @@ class DicoGenerator(PythonGenerator): extensions=('.comm',) #---------------------------------------------------------------------------------------- - def gener(self,obj,format='brut',config=None): + def gener(self,obj,format='brut',config=None,appli=None): self.initDico() diff --git a/generator/generator_dicoImbrique.py b/generator/generator_dicoImbrique.py index a9d937eb..9e5d1f63 100644 --- a/generator/generator_dicoImbrique.py +++ b/generator/generator_dicoImbrique.py @@ -49,7 +49,7 @@ class DicoImbriqueGenerator(PythonGenerator): extensions=('.comm',) #---------------------------------------------------------------------------------------- - def gener(self,obj,format='brut',config=None): + def gener(self,obj,format='brut',config=None, appli=None): self.initDico() diff --git a/generator/generator_map.py b/generator/generator_map.py index a009f759..b0637c9e 100644 --- a/generator/generator_map.py +++ b/generator/generator_map.py @@ -50,7 +50,7 @@ class MapGenerator(PythonGenerator): """ - def gener(self,obj,format='brut',config=None): + def gener(self,obj,format='brut',config=None,appli=None): self.initDico() self.text=PythonGenerator.gener(self,obj,format) if obj.isvalid() :self.genereExeMap() diff --git a/generator/generator_python.py b/generator/generator_python.py index 9bdd1f26..2ea045ac 100644 --- a/generator/generator_python.py +++ b/generator/generator_python.py @@ -547,14 +547,15 @@ class PythonGenerator: for val in obj.valeur : s =s +self.format_item(val,obj.etape,obj) + ',' obj.valeurFormatee.append(self.format_item(val,obj.etape,obj)) - if len(obj.valeur) > 1: + if len(obj.valeur) >= 1: s = '(' + s + '),' - if obj.valeur==[] : s="()," + if obj.valeur==[] or obj.valeur==() : s="()," if obj.nbrColonnes() : s=self.formatColonnes(obj.nbrColonnes(),obj.valeur,obj) else : obj.valeurFormatee=obj.valeur s=self.format_item(obj.valeur,obj.etape,obj) + ',' + print s return s diff --git a/generator/generator_vers3DSalome.py b/generator/generator_vers3DSalome.py index dc5931cb..f1be205b 100644 --- a/generator/generator_vers3DSalome.py +++ b/generator/generator_vers3DSalome.py @@ -88,7 +88,7 @@ class vers3DSalomeGenerator(PythonGenerator): self.commande = "" self.dict_attributs = {} - def gener(self,node,config=None): + def gener(self,node,config=None,appli=None): """ """ self.node=node