From patchwork Thu Nov 19 14:53:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1403074 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CcN4G4N3nz9sT6 for ; Fri, 20 Nov 2020 01:54:22 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2EC9686E17; Thu, 19 Nov 2020 14:54:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pQ2+-V2GE4cq; Thu, 19 Nov 2020 14:54:15 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 1AFA886E15; Thu, 19 Nov 2020 14:54:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 214BC1BF57F for ; Thu, 19 Nov 2020 14:54:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1D2FA86CFD for ; Thu, 19 Nov 2020 14:54:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id focH8rrCwOT1 for ; Thu, 19 Nov 2020 14:54:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7200D86DF2 for ; Thu, 19 Nov 2020 14:54:08 +0000 (UTC) X-Originating-IP: 86.201.80.25 Received: from localhost (lfbn-tou-1-236-25.w86-201.abo.wanadoo.fr [86.201.80.25]) (Authenticated sender: thomas.petazzoni@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 6489F240011; Thu, 19 Nov 2020 14:54:04 +0000 (UTC) From: Thomas Petazzoni To: Buildroot List Date: Thu, 19 Nov 2020 15:53:53 +0100 Message-Id: <20201119145354.1175043-3-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201119145354.1175043-1-thomas.petazzoni@bootlin.com> References: <20201119145354.1175043-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 3/4] utils/get-developers: use Developers.hasfile() where appropriate X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matt Weber , Heiko Thiery , Thomas Petazzoni , Titouan Christophe Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Instead of open-coding Developers.hasfile() in utils/get-developers, use it directly. Signed-off-by: Thomas Petazzoni Tested-by: Heiko Thiery --- utils/get-developers | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utils/get-developers b/utils/get-developers index 750fc556dc..20272ed60b 100755 --- a/utils/get-developers +++ b/utils/get-developers @@ -77,9 +77,8 @@ def __main__(): if args.files is not None: args.files = [os.path.abspath(f) for f in args.files] for dev in devs: - for devfile in dev.files: - commonfiles = [f for f in args.files if f.startswith(devfile)] - if commonfiles: + for f in args.files: + if dev.hasfile(f): print(dev.name) break