fix tools
This commit is contained in:
parent
7d78e18160
commit
e6e58704dc
@ -71,9 +71,7 @@ def optParser():
|
|||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
#usage = "%prog -p <port> [options]",
|
description = "acf - auto configuration tool"
|
||||||
version="acfg Version 1.0",
|
|
||||||
description = "acfg - auto configuration tool"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument('-p',
|
parser.add_argument('-p',
|
||||||
|
@ -646,8 +646,6 @@ def optParser():
|
|||||||
global allvin
|
global allvin
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
#usage = "%prog -p <port> [options]",
|
|
||||||
version="Document Viewer Version 1.0",
|
|
||||||
description = "Tool for view DocDb"
|
description = "Tool for view DocDb"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
6
pyren3/mod_acf_func.py
Executable file → Normal file
6
pyren3/mod_acf_func.py
Executable file → Normal file
@ -38,8 +38,8 @@ def acf_find_in_sirev( ref2, platform ):
|
|||||||
if len(list(errone.keys()))==0:
|
if len(list(errone.keys()))==0:
|
||||||
se=zip.open('SIREV_ERRONE.dat')
|
se=zip.open('SIREV_ERRONE.dat')
|
||||||
cont=se.read()
|
cont=se.read()
|
||||||
for l in cont.split('\n'):
|
for l in cont.split(b'\n'):
|
||||||
li = l.split('/')
|
li = l.split(b'/')
|
||||||
if len(li)==6 and li[0]==platform:
|
if len(li)==6 and li[0]==platform:
|
||||||
errone[li[2]] = li[3]
|
errone[li[2]] = li[3]
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ def acf_loadModules( de, refdata, platform ):
|
|||||||
print("Configuration database: ", acfFile)
|
print("Configuration database: ", acfFile)
|
||||||
|
|
||||||
zip=zipfile.ZipFile(acfFile)
|
zip=zipfile.ZipFile(acfFile)
|
||||||
zip.setpassword('A710FBD006342FC8')
|
zip.setpassword(b'A710FBD006342FC8')
|
||||||
zipflist = zip.namelist()
|
zipflist = zip.namelist()
|
||||||
|
|
||||||
module_list = []
|
module_list = []
|
||||||
|
5
pyren3/mod_acf_proc.py
Executable file → Normal file
5
pyren3/mod_acf_proc.py
Executable file → Normal file
@ -165,9 +165,10 @@ def acf_MTC_generateDefaults( m, mtc ):
|
|||||||
|
|
||||||
|
|
||||||
# write trailer
|
# write trailer
|
||||||
sf.write('\n# VIN programming\n')
|
sf.write('\n# VIN programming !!!check the command!!!\n')
|
||||||
sf.write('#2EF190' + hex_VIN_plus_CRC(mod_globals.vin, False) +'\n')
|
sf.write('#2EF190' + hex_VIN_plus_CRC(mod_globals.vin, False) +'\n')
|
||||||
sf.write('\n# reset ecu\n')
|
sf.write('#3B81' + hex_VIN_plus_CRC(mod_globals.vin, False) +'\n')
|
||||||
|
sf.write('\n# reset ecu or disconnect the battary!!!check the command!!!\n')
|
||||||
sf.write('#1101\n\n')
|
sf.write('#1101\n\n')
|
||||||
sf.write('exit\n')
|
sf.write('exit\n')
|
||||||
|
|
||||||
|
2
pyren3/mod_db_manager.py
Executable file → Normal file
2
pyren3/mod_db_manager.py
Executable file → Normal file
@ -228,7 +228,7 @@ def path_in_ddt( pattern ):
|
|||||||
|
|
||||||
def get_file_from_ddt( filename ):
|
def get_file_from_ddt( filename ):
|
||||||
if mod_globals.ddt_arc=='':
|
if mod_globals.ddt_arc=='':
|
||||||
return open(os.path.join(mod_globals.ddtroot, filename), 'r')
|
return open(os.path.join(mod_globals.ddtroot, filename), 'rb')
|
||||||
else:
|
else:
|
||||||
return mod_globals.ddt_arc.open(filename, 'r')
|
return mod_globals.ddt_arc.open(filename, 'r')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user