summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xpkgs/applications/networking/browsers/chromium/get-commit-message.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/pkgs/applications/networking/browsers/chromium/get-commit-message.py b/pkgs/applications/networking/browsers/chromium/get-commit-message.py
index bbadb3153ee..1aafc6147fd 100755
--- a/pkgs/applications/networking/browsers/chromium/get-commit-message.py
+++ b/pkgs/applications/networking/browsers/chromium/get-commit-message.py
@@ -21,15 +21,15 @@ for entry in feed.entries:
         continue
     #print(url)  # For debugging purposes
     version = re.search(r'\d+(\.\d+){3}', content).group(0)
-    fixes = re.search(r'This update includes .+ security fixes\.', content).group(0)
-    fixes = html_tags.sub('', fixes)
-    zero_days = re.search(r'Google is aware of reports that .+ in the wild\.', content)
-    if zero_days:
-        fixes += " " + zero_days.group(0)
-    cve_list = re.findall(r'CVE-[^: ]+', content)
-    cve_string = ' '.join(cve_list)
-    print('chromium: TODO -> ' + version + '\n')
-    print(url + '\n')
-    print('\n'.join(textwrap.wrap(fixes, width=72)) + '\n')
-    print("CVEs:\n" + '\n'.join(textwrap.wrap(cve_string, width=72)))
+    print('chromium: TODO -> ' + version)
+    print('\n' + url)
+    if fixes := re.search(r'This update includes .+ security fixes\.', content):
+        fixes = html_tags.sub('', fixes.group(0))
+        zero_days = re.search(r'Google is aware of reports that .+ in the wild\.', content)
+        if zero_days:
+            fixes += " " + zero_days.group(0)
+        print('\n' + '\n'.join(textwrap.wrap(fixes, width=72)))
+    if cve_list := re.findall(r'CVE-[^: ]+', content):
+        cve_string = ' '.join(cve_list)
+        print("\nCVEs:\n" + '\n'.join(textwrap.wrap(cve_string, width=72)))
     break  # We only care about the most recent stable channel update