9q fix#10 convert_db
This commit is contained in:
parent
d5cbb6aa8a
commit
98bc05ee65
@ -8,8 +8,6 @@ import zipfile
|
||||
from StringIO import StringIO
|
||||
import mod_db_manager
|
||||
|
||||
mod_db_manager.find_DBs()
|
||||
|
||||
from mod_optfile import *
|
||||
|
||||
if __name__ == "__main__":
|
||||
@ -22,6 +20,8 @@ if __name__ == "__main__":
|
||||
if not os.path.exists('./cache'):
|
||||
os.makedirs('./cache')
|
||||
|
||||
mod_db_manager.find_DBs()
|
||||
|
||||
inputpath = sys.argv[1]
|
||||
ecudir = os.path.join (inputpath, "EcuRenault")
|
||||
vehicledir = os.path.join (inputpath, "Vehicles")
|
||||
|
@ -183,6 +183,10 @@ def file_in_ddt( pattern ):
|
||||
file_list = glob.glob(os.path.join(mod_globals.ddtroot, pattern))
|
||||
else:
|
||||
file_list = mod_globals.ddt_arc.namelist()
|
||||
if '(' in pattern:
|
||||
pattern = pattern.replace('(','\(')
|
||||
if ')' in pattern:
|
||||
pattern = pattern.replace(')', '\)')
|
||||
regex = re.compile(pattern)
|
||||
li = list(filter(regex.search, file_list))
|
||||
return len(li)
|
||||
|
Loading…
x
Reference in New Issue
Block a user