chromium: get-commit-message.py: Deduplicate the CVE list
This commit is contained in:
parent
ad43df1eda
commit
de2edb81da
@ -6,6 +6,8 @@
|
|||||||
import re
|
import re
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
|
from collections import OrderedDict
|
||||||
|
|
||||||
import feedparser
|
import feedparser
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
@ -30,6 +32,7 @@ for entry in feed.entries:
|
|||||||
fixes += " " + zero_days.group(0)
|
fixes += " " + zero_days.group(0)
|
||||||
print('\n' + '\n'.join(textwrap.wrap(fixes, width=72)))
|
print('\n' + '\n'.join(textwrap.wrap(fixes, width=72)))
|
||||||
if cve_list := re.findall(r'CVE-[^: ]+', content):
|
if cve_list := re.findall(r'CVE-[^: ]+', content):
|
||||||
|
cve_list = list(OrderedDict.fromkeys(cve_list)) # Remove duplicates but preserve the order
|
||||||
cve_string = ' '.join(cve_list)
|
cve_string = ' '.join(cve_list)
|
||||||
print("\nCVEs:\n" + '\n'.join(textwrap.wrap(cve_string, width=72)))
|
print("\nCVEs:\n" + '\n'.join(textwrap.wrap(cve_string, width=72)))
|
||||||
break # We only care about the most recent stable channel update
|
break # We only care about the most recent stable channel update
|
||||||
|
Loading…
x
Reference in New Issue
Block a user