From b69b06d48bee4853a567e7f2bc5ad0c1e6d5e800 Mon Sep 17 00:00:00 2001 From: PASCALE NOYRET Date: Mon, 30 May 2022 08:41:14 +0200 Subject: [PATCH] codes retour --- InterfaceQT4/readercata.py | 7 +++---- Tools/generateComm.py | 5 ++++- Tools/generateXML.py | 5 ++++- Tools/generateXSD.py | 5 ++++- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/InterfaceQT4/readercata.py b/InterfaceQT4/readercata.py index 61c6fa6e..57b29cce 100644 --- a/InterfaceQT4/readercata.py +++ b/InterfaceQT4/readercata.py @@ -241,7 +241,7 @@ class ReaderCata (ReaderCataCommun): if self.fichierCata == None : self.choisitCata() self.cata = self.importCata(self.fichierCata) - if not self.cata : return + if not self.cata : sys.exit(1) if self.code == 'NonConnu' : self.code = self.cata.JdC.code modeleMetier = None self.cata.fileModeleMetier = None @@ -280,7 +280,7 @@ class ReaderCata (ReaderCataCommun): #print ('dans readerCata _________', dicoEltDif) except : - if self.appliEficas.ssIhm == False :print ('______________ unable to load xsd driver ') + #if self.appliEficas.ssIhm == False :print (' unable to load xsd driver ') self.QWParent.informe('XSD driver', 'unable to load xsd driver',critique=False) modeleMetier = None @@ -380,10 +380,9 @@ class ReaderCata (ReaderCataCommun): o=__import__(nom_cata) return o except Exception as e: - self.QWParent.informe('catalog', 'unable to load catalog file') + self.QWParent.informe('catalog python', 'unable to load catalog file') #import traceback #traceback.print_exc() - return 0 diff --git a/Tools/generateComm.py b/Tools/generateComm.py index 052ca6f2..7ff81b46 100755 --- a/Tools/generateComm.py +++ b/Tools/generateComm.py @@ -33,4 +33,7 @@ import os sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'../')) from InterfaceQT4 import eficas_go -eficas_go.genereComm(code='NonConnu') +if eficas_go.genereComm(code='NonConnu'): + sys.exit(0) +else : + sys.exit(1) diff --git a/Tools/generateXML.py b/Tools/generateXML.py index dbc99449..fd827c82 100755 --- a/Tools/generateXML.py +++ b/Tools/generateXML.py @@ -33,4 +33,7 @@ import os sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'../')) from InterfaceQT4 import eficas_go -eficas_go.genereXML(code='NonConnu') +if eficas_go.genereXML(code='NonConnu'): + sys.exit(0) +else : + sys.exit(1) diff --git a/Tools/generateXSD.py b/Tools/generateXSD.py index 813d874e..649d44e9 100755 --- a/Tools/generateXSD.py +++ b/Tools/generateXSD.py @@ -30,4 +30,7 @@ import os sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) from InterfaceQT4 import eficas_go -eficas_go.genereXSD(code='NonConnu') +if eficas_go.genereXSD(code='NonConnu'): + sys.exit(0) +else: + sys.exit(1) -- 2.39.2