diff mbox series

[wrynose,32/52] scripts/cve-json-to-text.py: simplify getopt argument parsing

Message ID 7b16c77e448e1b4ee367e708b0e5793a44749b3c.1778198557.git.yoann.congal@smile.fr
State New
Headers show
Series [wrynose,01/52] shadow: set CVE_PRODUCT | expand

Commit Message

Yoann Congal May 8, 2026, 7:11 a.m. UTC
From: Bin Cao <bin.cao.cn@windriver.com>

Remove unused long options from getopt.getopt() call. The long options
"help", "input", and "output" were never handled in the option parsing
logic, so they are dead code.

Signed-off-by: Bin Cao <bin.cao.cn@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
(cherry picked from commit a92dfe569844189344fbb5ea0521b2bf7dbf0623)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
 scripts/cve-json-to-text.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/scripts/cve-json-to-text.py b/scripts/cve-json-to-text.py
index 8d309b37e59..f3386722696 100755
--- a/scripts/cve-json-to-text.py
+++ b/scripts/cve-json-to-text.py
@@ -42,9 +42,7 @@  def parse_args(argv):
     """
     global infile, outfile
     try:
-        opts, args = getopt.getopt(
-            argv, "hi:o:", ["help", "input", "output"]
-        )
+        opts, args = getopt.getopt(argv, "hi:o:")
     except getopt.GetoptError:
         show_syntax_and_exit(1)
     for opt, arg in opts: