From c7c8697a62fbd5985fc95b7f89eb3975f9991c49 Mon Sep 17 00:00:00 2001 From: jiajia tang Date: Tue, 8 Mar 2022 18:27:24 +0800 Subject: [PATCH] Simplify codes when _LoadOemDicts Use function LoadDictionaryFromFile(), instead of LoadDictionaryFromLines(). Makes codes conciser. Signed-off-by: jiajia tang Change-Id: I15d6d4281a03be8a2f6f855054b1e4c1c3010fcd --- tools/releasetools/ota_from_target_files.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py index 43c39fbbed..3c0fd34124 100755 --- a/tools/releasetools/ota_from_target_files.py +++ b/tools/releasetools/ota_from_target_files.py @@ -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