fix deprecation warning for mediawiki update script

This commit is contained in:
Vegard Bieker Matthey
2026-05-09 20:26:44 +02:00
committed by Vegard Bieker Matthey
parent b009da31af
commit 2fcaf5893f

View File

@@ -83,7 +83,7 @@ def get_newest_commit(project_name: str, tracking_branch: str) -> str:
content = requests.get(f"{BASE_WEB_URL}/{project_name}/+log/refs/heads/{tracking_branch}/").text content = requests.get(f"{BASE_WEB_URL}/{project_name}/+log/refs/heads/{tracking_branch}/").text
soup = bs4.BeautifulSoup(content, features="html.parser") soup = bs4.BeautifulSoup(content, features="html.parser")
try: try:
a = soup.find('li').findChild('a') a = soup.find('li').find('a')
commit_sha = a['href'].split('/')[-1] commit_sha = a['href'].split('/')[-1]
except AttributeError: except AttributeError:
print(f"ERROR: Could not parse page for {project_name}:") print(f"ERROR: Could not parse page for {project_name}:")