From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 191FB941B55 for ; Fri, 10 Nov 2023 19:31:18 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=5ajon15k3z8ZVIOgKoNlibTRfrsKzbntLBy8j1eOQXg=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1699644677; v=1; b=s8KvGKBiNzXFjPjqxAURbpab1+TS2F73fxMsOFfi0Y/qZxlbp/NmOO9y7622i6hXleM9hOBS naaaoNG+0HGJdxjXDsyQO2kLCcxy+2gPa+Dm7EP+Pz3MUbnGAr8zdHo8ISMRSvpy+XM553e8GwG OmChz7xu0ATa+t+QOsbXkaxc= X-Received: by 127.0.0.2 with SMTP id 2RW9YY7687511xF0fQXayHIn; Fri, 10 Nov 2023 11:31:17 -0800 X-Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web10.37039.1699644677268060426 for ; Fri, 10 Nov 2023 11:31:17 -0800 X-Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AAHSbDN032404; Fri, 10 Nov 2023 19:31:09 GMT X-Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3u9dx1hw1b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Nov 2023 19:31:08 +0000 X-Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3AAJV8Id008360 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Nov 2023 19:31:08 GMT X-Received: from qc-i7.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Fri, 10 Nov 2023 11:31:06 -0800 From: "Leif Lindholm" To: CC: Michael D Kinney , Rebecca Cran , Liming Gao , Bob Feng , Yuwei Chen Subject: [edk2-devel] [PATCH v3 2/5] BaseTools/Scripts/GetMaintainer: Simplify logic Date: Fri, 10 Nov 2023 19:30:50 +0000 Message-ID: <20231110193053.673595-3-quic_llindhol@quicinc.com> In-Reply-To: <20231110193053.673595-1-quic_llindhol@quicinc.com> References: <20231110193053.673595-1-quic_llindhol@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-ORIG-GUID: ci_ZVnpjp3uT5aNK6-2pxUDhVppmI4Pf X-Proofpoint-GUID: ci_ZVnpjp3uT5aNK6-2pxUDhVppmI4Pf Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,quic_llindhol@quicinc.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: aoz6fsfbSHuLxNLzNseibUzLx7686176AA= Content-Transfer-Encoding: 8bit Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=s8KvGKBi; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=quicinc.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io From: Michael D Kinney 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 --- BaseTools/Scripts/GetMaintainer.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/BaseTools/Scripts/GetMaintainer.py b/BaseTools/Scripts/GetMaintainer.py index 2a3147c059b5..cdcdff750635 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 -- 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111065): https://edk2.groups.io/g/devel/message/111065 Mute This Topic: https://groups.io/mt/102513768/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-