* [PATCH v2] scripts/spdxcheck: add friendly error message for missing ply module
@ 2026-08-27 5:52 3237174131
2026-08-27 6:03 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: 3237174131 @ 2026-08-27 5:52 UTC (permalink / raw)
To: linux-kernel; +Cc: tglx, gregkh
Changes since v1:
- Remove email headers from patch body
The spdxcheck.py script requires the 'ply' Python module, but when
it is missing, the script crashes with a raw ImportError traceback.
This is especially problematic in CI environments where the error
is not immediately obvious.
Add a friendly error message that tells the user exactly what is
needed and how to install it.
Signed-off-by: Xia Zhoxin <3237174131@qq.com>
---
scripts/spdxcheck.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py
--- a/scripts/spdxcheck.py
+++ b/scripts/spdxcheck.py
@@ -5,7 +5,13 @@
from argparse import ArgumentParser
-from ply import lex, yacc
+try:
+ from ply import lex, yacc
+except ImportError as e:
+ import sys
+ sys.stderr.write('Error: %s\n' % e)
+ sys.stderr.write('Please install the ply module (e.g., pip install ply)\n')
+ sys.exit(1)
import locale
import traceback
import fnmatch
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] scripts/spdxcheck: add friendly error message for missing ply module
2026-08-27 5:52 [PATCH v2] scripts/spdxcheck: add friendly error message for missing ply module 3237174131
@ 2026-08-27 6:03 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2026-08-27 6:03 UTC (permalink / raw)
To: 3237174131; +Cc: linux-kernel, tglx
On Wed, Aug 26, 2026 at 10:50:51PM -0700, 3237174131@qq.com wrote:
> Changes since v1:
> - Remove email headers from patch body
This goes below the --- line.
Please slow down, there is no rush, you should wait a few days between
submissions.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-27 6:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-27 5:52 [PATCH v2] scripts/spdxcheck: add friendly error message for missing ply module 3237174131
2026-08-27 6:03 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®