From patchwork Tue Jul 11 13:39:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 18807 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 661C9BDC71 for ; Tue, 11 Jul 2023 13:39:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5BDD2628C4; Tue, 11 Jul 2023 15:39:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1689082763; bh=dwGTKB4Xdctx/L/3EVlsU8sd8d0ACNj3Q86W2ydualk=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=kRuEbfGguisfLmfhXvYjUFeY7EtYobVwtvkx3N0hkONSBsVW9FNBnVitciWlYXoTA uTEIMAWD7vEUZ/V9Hx8a+Yqr7DodLtpRTlbTGfp+eLtHhhLNyaTRKv8G2TNAZ4uCFz xwzru7KyhnvnzvXL91LAG44OgIeS+/jSJT33CDH9Kl6pCot8uJ+0R5af+NUenAngQ2 JDPIJqOVx/NZKpwPxw1XlhPgx8VcV7uPzd3PgJXBiOa7x3dg1+d5EDWlF9DDAj7PyN KdkIbpQyRtTNc5Z9VWe5OuTP7J90jL9iSfcDXNGt7P3ACTZrTpRUvqI/Bh9W5HCcVJ PwAwWFqfxNQoQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8CC09628BD for ; Tue, 11 Jul 2023 15:39:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="BYt5s24O"; dkim-atps=neutral Received: from Monstersaurus.local (aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net [82.37.23.78]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B1DCBDC9; Tue, 11 Jul 2023 15:38:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1689082711; bh=dwGTKB4Xdctx/L/3EVlsU8sd8d0ACNj3Q86W2ydualk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BYt5s24ObadzwqeTt6jyH9bwyY6aDNFqUk9MEV6/RF+GM7kVqFC8poGoc6wccoiQk 3K49H+Wb8LnO3fVe9wLCIoP+shz5z8Yb3m5Mgx5tLZfGMhurAeEv6Evm06cbnQZEfi JJX1f6oy7/A76aseNsjKkou3mR3abMQmdEgqgINU= To: libcamera devel Date: Tue, 11 Jul 2023 14:39:13 +0100 Message-Id: <20230711133915.650485-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230711133915.650485-1-kieran.bingham@ideasonboard.com> References: <20230711133915.650485-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/4] utils: checkstyle.py: Initialise staged trailers X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" There are no possible Trailers for staged changes as the commit message has not yet been written. Initialise the empty trailers when the commit object is initialised. Signed-off-by: Kieran Bingham Reviewed-by: Umang Jain --- utils/checkstyle.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/checkstyle.py b/utils/checkstyle.py index 5a1268064d31..2ba3165b8ecd 100755 --- a/utils/checkstyle.py +++ b/utils/checkstyle.py @@ -253,6 +253,9 @@ class StagedChanges(Commit): def __init__(self): Commit.__init__(self, '') + # There are no trailers to parse on a Staged Change. + self._trailers = [] + def _parse(self): ret = subprocess.run(['git', 'diff', '--staged', '--name-status'], stdout=subprocess.PIPE).stdout.decode('utf-8')