Skip to content

Commit

Permalink
follow-cvelist.py backwards compatibility
Browse files Browse the repository at this point in the history
Since 7c86751, PEP 634 – Structural Pattern Matching
was used; a feature added in Python 3.10.
Replaced with a Python 3.8 compatible alternative.
  • Loading branch information
oh2fih committed Jul 31, 2024
1 parent b53e936 commit 151c645
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions bin/follow-cvelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,16 +584,14 @@ def check_positive(value: str) -> int:
default=30,
)
args = argParser.parse_args()
match args.verbose:
case 4:
print(
"VERBOSITY: raw json, raw changes, git pulls, commit IDs",
file=sys.stderr,
)
case 3:
print("VERBOSITY: raw changes, git pulls, commit IDs", file=sys.stderr)
case 2:
print("VERBOSITY: git pulls, commit IDs", file=sys.stderr)
case 1:
print("VERBOSITY: commit IDs", file=sys.stderr)
if args.verbose > 4:
args.verbose = 4
verbosity = {
4: "raw json, raw changes, git pulls, commit ID",
3: "raw changes, git pulls, commit IDs",
2: "git pulls, commit IDs",
1: "commit IDs",
}
if args.verbose > 0:
print(f"VERBOSITY: {verbosity[args.verbose]}", file=sys.stderr)
main(args)

0 comments on commit 151c645

Please sign in to comment.