From 12509e26d0b629db59a93f5c3034ae9414775b8e Mon Sep 17 00:00:00 2001 From: Hubert Jasudowicz Date: Fri, 3 Jan 2025 01:38:11 +0100 Subject: [PATCH] sommelier: Fix update script --- pkgs/applications/window-managers/sommelier/update.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/window-managers/sommelier/update.py b/pkgs/applications/window-managers/sommelier/update.py index 03898c9ccdd8..9c514696cbaa 100755 --- a/pkgs/applications/window-managers/sommelier/update.py +++ b/pkgs/applications/window-managers/sommelier/update.py @@ -20,14 +20,17 @@ from urllib.request import urlopen # documented. with urlopen('https://chromiumdash.appspot.com/cros/download_serving_builds_csv?deviceCategory=ChromeOS') as resp: reader = csv.reader(map(bytes.decode, resp)) - header = reader.__next__() + header = next(reader) cr_stable_index = header.index('cr_stable') cros_stable_index = header.index('cros_stable') chrome_version = [] platform_version = [] for line in reader: - this_chrome_version = list(map(int, line[cr_stable_index].split('.'))) + this_chrome_version_str = line[cr_stable_index] + if "no update" in this_chrome_version_str: + continue + this_chrome_version = list(map(int, this_chrome_version_str.split('.'))) this_platform_version = list(map(int, line[cros_stable_index].split('.'))) chrome_version = max(chrome_version, this_chrome_version) platform_version = max(platform_version, this_platform_version)