Simplify codes when _LoadOemDicts

Use function LoadDictionaryFromFile(), instead of
LoadDictionaryFromLines(). Makes codes conciser.

Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
Change-Id: I15d6d4281a03be8a2f6f855054b1e4c1c3010fcd
This commit is contained in:
jiajia tang
2022-03-08 18:27:24 +08:00
parent 7d4b3d25e7
commit c7c8697a62

View File

@@ -543,8 +543,7 @@ def _LoadOemDicts(oem_source):
oem_dicts = []
for oem_file in oem_source:
with open(oem_file) as fp:
oem_dicts.append(common.LoadDictionaryFromLines(fp.readlines()))
oem_dicts.append(common.LoadDictionaryFromFile(oem_file))
return oem_dicts