From 3c0c35fd9f5d68191a282597df04d6a4bd243360 Mon Sep 17 00:00:00 2001 From: caojiale1 Date: Thu, 27 Apr 2023 12:15:34 +0800 Subject: [PATCH] Signed-off-by caojiale1 caojiale1@huawei.com Signed-off-by: caojiale1 --- localCoverage/resident_service/pull_service_gcda.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localCoverage/resident_service/pull_service_gcda.py b/localCoverage/resident_service/pull_service_gcda.py index f38092b..ca40131 100644 --- a/localCoverage/resident_service/pull_service_gcda.py +++ b/localCoverage/resident_service/pull_service_gcda.py @@ -56,7 +56,7 @@ def get_gcda_file(device_ip, device_sn, process_str, component_gcda_dict, home_path = '/'.join(roots_path.split("/")[:3]) gcda_path = f"/data/gcov{roots_path}" - component_gcda_paths = component_gcda_dict[process_str] if component_gcda_dict[process_str] else [] + component_gcda_paths = component_gcda_dict.get(process_str) if component_gcda_dict.get(process_str) else [] for component_gcda_path in component_gcda_paths: gcov_root = os.path.join(gcda_path, 'out', product_name, component_gcda_path) gcda_file_name = os.path.basename(gcov_root)