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 <rebecca@bsdio.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
This commit is contained in:
Michael D Kinney 2023-11-10 11:30:50 -08:00 committed by mergify[bot]
parent 431ead235f
commit 1cb580be85
1 changed files with 2 additions and 4 deletions

View File

@ -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