[PATCH] scripts/spdxcheck-test.sh: Drop python2

Nishanth Menon <[email protected]>
Newsgroups org.kernel.vger.linux-spdx,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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 <[email protected]>
Signed-off-by: Nishanth Menon <[email protected]>
---

Also see checkpatch.pl patch
https://lore.kernel.org/lkml/[email protected]/

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.