fix allvin in doc_maker

This commit is contained in:
shrlnm 2023-02-11 15:33:39 +03:00
parent 335762a238
commit bf14602dae
2 changed files with 9 additions and 4 deletions

View File

@ -553,7 +553,12 @@ def generateHTML(path, mtc, vin, dfg, date_madc ):
global style global style
lf = os.listdir(path) try:
lf = os.listdir(path)
except:
print("ERROR: path not found: ", path)
exit()
doc = et.Element('html') doc = et.Element('html')
h_h = et.SubElement(doc,'head') h_h = et.SubElement(doc,'head')
h_b = et.SubElement(doc,'body') h_b = et.SubElement(doc,'body')

View File

@ -68,14 +68,14 @@ def acf_buildFull( platf ):
return return
mtc = {} mtc = {}
mtcf = open(plDIR+'/MTC.dat', 'rb') mtcf = open(plDIR+'/MTC.dat', 'rt')
mtc_list = csv.reader(mtcf, delimiter=';') mtc_list = csv.reader(mtcf, delimiter=';')
for i in mtc_list: for i in mtc_list:
if i: if i:
mtc[int(i[0][:-4])] = i[1:] mtc[int(i[0][:-4])] = i[1:]
ref = {} ref = {}
reff = open(plDIR+'/REF.dat', 'rb') reff = open(plDIR+'/REF.dat', 'rt')
ref_list = csv.reader(reff, delimiter=';') ref_list = csv.reader(reff, delimiter=';')
for i in ref_list: for i in ref_list:
if i: if i:
@ -104,7 +104,7 @@ def acf_buildFull( platf ):
VIN2 = i.split('.')[0] VIN2 = i.split('.')[0]
print(' '+VIN2) print(' '+VIN2)
zf=zip.open(i) zf=zip.open(i)
vin3list=zf.read() vin3list=str(zf.read())
zf.close() zf.close()
for l in vin3list.split('\n'): for l in vin3list.split('\n'):
l = l.strip() l = l.strip()