Skip to contentSkip to conversation

scripts/cve-json-to-text.py: simplify getopt argument parsing

PATCH New Bin Cao 1 participant 1 message Apr 20

lore
Share & tools
lore

Bin Cao

author
#0 lore raw

PATCH 1/1 scripts/cve-json-to-text.py: simplify getopt argument parsing

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.

---
 scripts/cve-json-to-text.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
scripts/cve-json-to-text.py +1 -3
index 8d309b37e5..f338672269 100755
@@ -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:
Signature · 1 line
2.43.0