/usr/share/pyshared/Traducteur/dictErreurs.py is in eficas 2.0.3-1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | # -*- coding: utf-8 -*-
import logging
import sets
jdcSet=sets.Set()
def EcritErreur(listeGena,ligne=None) :
from sys import dict_erreurs
maCle=""
for Mot in listeGena :
maCle=maCle+"_"+Mot
#try :
if ( 1 == 1) :
maClef=maCle[1:]
if maClef in dict_erreurs.keys() :
if ligne != None :
logging.warning("ligne %d : %s ",ligne,dict_erreurs[maClef])
else :
logging.warning("%s",dict_erreurs[maClef])
else :
maCle=""
for Mot in listeGena[:-1] :
maCle=maCle+"_"+Mot
maClef=maCle[1:]
maClef=maCle+"_"+"VALEUR"
if maClef in dict_erreurs.keys() :
if ligne != None :
logging.warning("ligne %d : %s ",ligne,dict_erreurs[maClef])
else :
logging.warning("%s",dict_erreurs[maClef])
#except :
# pass
def GenereErreurPourCommande(jdc,listeCommande) :
commands= jdc.root.childNodes[:]
commands.reverse()
for c in commands:
jdcSet.add(c.name)
for Mot in listeCommande :
if c.name != Mot :continue
EcritErreur((Mot,),c.lineno)
def GenereErreurMotCleInFact(jdc,command,fact,mocle):
for c in jdc.root.childNodes:
if c.name != command:continue
for mc in c.childNodes:
if mc.name != fact:continue
l=mc.childNodes[:]
for ll in l:
for n in ll.childNodes:
if n.name != mocle:
continue
else :
EcritErreur((command,fact,mocle,),c.lineno)
|