Skip to contentSkip to conversation

scripts/cve-json-to-text.py: remove unused options

PATCH New Antonin Godard 1 participant 2 messages Apr 25, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 scripts/cve-json-to-text.py: remove unused options

Remove --all and -a and they are unused in the file. Remove long options as they don't actually exist when using getopt.

---
 scripts/cve-json-to-text.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
scripts/cve-json-to-text.py +2 -5
index 87a5669987..a2eb592f5f 100755
@@ -48,12 +48,9 @@ def parse_args(argv):
     except getopt.GetoptError:
         show_syntax_and_exit(1)
     for opt, arg in opts:
-        if opt in ("-h", "--help"):
+        if opt in ("-h"):
             show_syntax_and_exit(0)
-        elif opt in ("-a", "--all"):
-            show_all = True
-            show_unknown = True
-        elif opt in ("-i", "--input"):
+        elif opt in ("-i"):
             infile = arg
 
 def load_json(filename):
#1 lore raw

PATCH 2/2 scripts/cve-json-to-text.py: fix missing -o option

Add the missing condition on '-o', which allows changing the output path.

---
 scripts/cve-json-to-text.py | 2 ++
 1 file changed, 2 insertions(+)
scripts/cve-json-to-text.py +2 -0
index a2eb592f5f..8d309b37e5 100755
@@ -52,6 +52,8 @@ def parse_args(argv):
             show_syntax_and_exit(0)
         elif opt in ("-i"):
             infile = arg
+        elif opt in ("-o"):
+            outfile = arg
 
 def load_json(filename):
     """