mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-05-12 17:41:15 +02:00
fix deprecation warning for mediawiki update script
This commit is contained in:
committed by
Vegard Bieker Matthey
parent
b009da31af
commit
2fcaf5893f
@@ -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}:")
|
||||||
|
|||||||
Reference in New Issue
Block a user