Skip to content

Commit

Permalink
Adjust upd01_get_list_of_updates.py for 11-24H2 availability
Browse files Browse the repository at this point in the history
  • Loading branch information
m417z committed Oct 1, 2024
1 parent fc87c06 commit 09f9c05
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions data/upd01_get_list_of_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ def get_updates_from_microsoft_support_for_version(windows_major_version, url):
assert windows_version not in all_updates

# Specific title fixes.
if windows_version == '11-23H2':
updates_section = updates_section.replace('>Windows 11, version 23H2 </a>', '>Windows 11, version 23H2</a>')

if windows_version in ['21H2', '21H1', '20H2']:
updates_section = updates_section.replace('KB5012599(OS Builds', 'KB5012599 (OS Builds')

Expand All @@ -118,7 +115,7 @@ def get_updates_from_microsoft_support_for_version(windows_major_version, url):

updates_section = re.sub(r'<a [^>]*>Windows.*? update history</a>', '', updates_section, flags=re.IGNORECASE)
updates_section = re.sub(r'<a [^>]*>End of service statement</a>', '', updates_section, flags=re.IGNORECASE)
updates_section = re.sub(r'<a [^>]*>Windows 11, version \w+</a>', '', updates_section, flags=re.IGNORECASE)
updates_section = re.sub(r'<a [^>]*>Windows 11, version \w+\s*</a>', '', updates_section, flags=re.IGNORECASE)

p = r'<a class="supLeftNavLink" data-bi-slot="\d+" href="/en-us(/help/\d+)">((\w+) (\d+), (\d+) ?(?:&#x2014;|-) ?KB(\d{7})(?: Update for Windows 10 Mobile)? \(OS Builds? .+?\).*?)</a>'
items = re.findall(p, updates_section)
Expand Down Expand Up @@ -281,7 +278,10 @@ def main():
consolidate_overlapping_updates(updates_from_release_health)
windows_version_updates_sanity_check(updates_from_release_health)

assert updates_from_microsoft_support.keys() == updates_from_release_health.keys()
assert updates_from_microsoft_support.keys() == updates_from_release_health.keys() | {
# Temporarily (?) missing in Release Health.
'11-24H2',
}

result = updates_from_microsoft_support
merge_updates(result, updates_from_release_health)
Expand Down

0 comments on commit 09f9c05

Please sign in to comment.