From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B70BC07E95 for ; Wed, 7 Jul 2021 21:06:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3453661CD0 for ; Wed, 7 Jul 2021 21:06:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230033AbhGGVIw (ORCPT ); Wed, 7 Jul 2021 17:08:52 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:34236 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230032AbhGGVIv (ORCPT ); Wed, 7 Jul 2021 17:08:51 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 167L64BT123290; Wed, 7 Jul 2021 16:06:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1625691964; bh=cBdek8vW38iLskZ5uj04DHrfr+HzrGMK3kExFl48NHk=; h=From:To:CC:Subject:Date; b=FVZhsIn4emD1AsiQnUpSveuG2cQ66eTt5jBT3RcuVcrasjv6QGDs+YTDLuCKLi4tF 7aY/qLmgfd5O03U6gPnW6sAKjzUREmawwMVR/rPCw7YZYYtNe7tvO3h6+yFw5WM4jp 6XcpJtw95FW21PQYZ+HKINJI58xnEbL0XlfabRNY= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 167L63t1114961 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 7 Jul 2021 16:06:04 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 7 Jul 2021 16:06:03 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Wed, 7 Jul 2021 16:06:03 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 167L63wR061298; Wed, 7 Jul 2021 16:06:03 -0500 From: Nishanth Menon To: Greg Kroah-Hartman , Thomas Gleixner CC: , , Nishanth Menon , Bert Vermeulen Subject: [PATCH] scripts/spdxcheck-test.sh: Drop python2 Date: Wed, 7 Jul 2021 16:06:00 -0500 Message-ID: <20210707210600.7266-1-nm@ti.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-spdx@vger.kernel.org Since commit d0259c42abff ("spdxcheck.py: Use Python 3"), spdxcheck.py explicitly expects to run as python3 script, there is no further point in attempting to test with python2. Cc: Bert Vermeulen Signed-off-by: Nishanth Menon --- Also see checkpatch.pl patch https://lore.kernel.org/lkml/20210505211720.447111-1-linux@roeck-us.net/ PS: While it may be debatable if *ever* there is going to be a python4 and hence leave the for loop alone (in addition to reducing the diffstat). I just took the path where I hope if we ever see that day, we pick one version. scripts/spdxcheck-test.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/scripts/spdxcheck-test.sh b/scripts/spdxcheck-test.sh index cfea6a0d1cc0..cb76324756bd 100644 --- a/scripts/spdxcheck-test.sh +++ b/scripts/spdxcheck-test.sh @@ -1,12 +1,10 @@ #!/bin/sh -for PYTHON in python2 python3; do - # run check on a text and a binary file - for FILE in Makefile Documentation/logo.gif; do - $PYTHON scripts/spdxcheck.py $FILE - $PYTHON scripts/spdxcheck.py - < $FILE - done - - # run check on complete tree to catch any other issues - $PYTHON scripts/spdxcheck.py > /dev/null +# run check on a text and a binary file +for FILE in Makefile Documentation/logo.gif; do + python3 scripts/spdxcheck.py $FILE + python3 scripts/spdxcheck.py - < $FILE done + +# run check on complete tree to catch any other issues +python3 scripts/spdxcheck.py > /dev/null -- 2.32.0