From 1cb580be85d01b6bd76449dc9615b044da9a23b1 Mon Sep 17 00:00:00 2001 From: Michael D Kinney Date: Fri, 10 Nov 2023 11:30:50 -0800 Subject: BaseTools/Scripts/GetMaintainer: Simplify logic REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4593 get_section_maintainers() either returns a list with valid entries or an empty list. It never returns None. Simplify logic that accumulates maintainers and lists by unconditionally appending lists returned from get_section_maintainers(). Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Cc: Yuwei Chen Cc: Leif Lindholm Signed-off-by: Michael D Kinney Acked-by: Rebecca Cran Reviewed-by: Leif Lindholm --- BaseTools/Scripts/GetMaintainer.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'BaseTools') diff --git a/BaseTools/Scripts/GetMaintainer.py b/BaseTools/Scripts/GetMaintainer.py index 2a3147c059..cdcdff7506 100644 --- a/BaseTools/Scripts/GetMaintainer.py +++ b/BaseTools/Scripts/GetMaintainer.py @@ -105,10 +105,8 @@ def get_maintainers(path, sections, level=0): lists = [] for section in sections: tmp_maint, tmp_lists = get_section_maintainers(path, section) - if tmp_maint: - maintainers += tmp_maint - if tmp_lists: - lists += tmp_lists + maintainers += tmp_maint + lists += tmp_lists if not maintainers: # If no match found, look for match for (nonexistent) file -- cgit v1.2.3