chromium: Make get-commit-message.py more robust

Not all updates contain security fixes.

+11 -11
+11 -11
pkgs/applications/networking/browsers/chromium/get-commit-message.py
··· 21 continue 22 #print(url) # For debugging purposes 23 version = re.search(r'\d+(\.\d+){3}', content).group(0) 24 - fixes = re.search(r'This update includes .+ security fixes\.', content).group(0) 25 - fixes = html_tags.sub('', fixes) 26 - zero_days = re.search(r'Google is aware of reports that .+ in the wild\.', content) 27 - if zero_days: 28 - fixes += " " + zero_days.group(0) 29 - cve_list = re.findall(r'CVE-[^: ]+', content) 30 - cve_string = ' '.join(cve_list) 31 - print('chromium: TODO -> ' + version + '\n') 32 - print(url + '\n') 33 - print('\n'.join(textwrap.wrap(fixes, width=72)) + '\n') 34 - print("CVEs:\n" + '\n'.join(textwrap.wrap(cve_string, width=72))) 35 break # We only care about the most recent stable channel update
··· 21 continue 22 #print(url) # For debugging purposes 23 version = re.search(r'\d+(\.\d+){3}', content).group(0) 24 + print('chromium: TODO -> ' + version) 25 + print('\n' + url) 26 + if fixes := re.search(r'This update includes .+ security fixes\.', content): 27 + fixes = html_tags.sub('', fixes.group(0)) 28 + zero_days = re.search(r'Google is aware of reports that .+ in the wild\.', content) 29 + if zero_days: 30 + fixes += " " + zero_days.group(0) 31 + print('\n' + '\n'.join(textwrap.wrap(fixes, width=72))) 32 + if cve_list := re.findall(r'CVE-[^: ]+', content): 33 + cve_string = ' '.join(cve_list) 34 + print("\nCVEs:\n" + '\n'.join(textwrap.wrap(cve_string, width=72))) 35 break # We only care about the most recent stable channel update